Nova

Extensions


Readme

Sass Extension for Nova

Converts scss files into css files automatically on save.

Features

  • Converts scss files into css files automatically on save
  • Automatically create source maps
  • Generated css can be compressed or expanded
  • Notification of compile errors

Requirements

Before using this extension, you must ensure that sass is installed on your system. One method is using Homebrew.

Sass Insall

  1. Install Homebrew.
  2. Via Terminal run brew install sass/sass/sass

Extension Installation

  1. Open Nova.
  2. Choose menu Extensions > Extension Library...
  3. Search extension Sass
  4. Click Install.

Preferences

Preferences are managed per project, these can be accessed via Project -> Project Settings -> Sass

Enable compile Sass on Save Enables compile on save for this project.

CSS Style Expanded, Compressed Controls the output style of the resulting CSS.

Error CSS On, Off Tells Sass whether to emit a CSS file when an error occurs during compilation.

Generate Source Map External, Internal, Off Source maps are files that tell browsers or other tools that consume CSS how that CSS corresponds to the Sass files from which it was generated. They make it possible to see and even edit your Sass files in browsers.

Update Path source/css/ Manually set the path that an update will be performed on, relative to the workspace directory.

Output Path dist/css/ Manually set the output path of the generated css files, relative to the workspace directory.

Executable Path /path/to/sass Manually enter or select the scss binary location.

Notes

  • As default the scss processor will compile in the current directory. If the current directory name is scss it will start at the parent. This allows us to use the following directory structure where the combined.scss includes styles from the sub folder: project project/assets/css project/assets/css/combined.css project/assets/css/combined.scss project/assets/css/scss project/assets/css/scss/_include.scss

If either _include.scss or combined.scss are saved the compiler will run on the directory project/assets/css/


Changelog

ChangeLog

Version 1.5

  • Move config items to configWorkspace (Thanks to @JohnWickham)
  • Added a new preference to enable compile on save for the project

Version 1.4

  • Fixed bug where the output path was not relative to the workspace path

Version 1.3

  • Added support for .sass file extensions and indented format
  • Added preference for an output directory relative to workspace

Version 1.2

  • Added preference to manually set the path that an update will be performed on, relative to the workspace directory

Version 1.1

  • Added preference for the compile scope

Version 1.0

  • Icon change and internal re-structure

Version 0.9

  • Auto hide the error notification after 10 seconds or if the file is re-saved without an error.
  • Other bug fixes
  • See README Notes for a change to the compile directory
  • Updated README

Version 0.8

  • Changed the update root from the workspace root to the files current directory

Version 0.7

  • Updated Icon

Version 0.6.5

  • Bug fix if only one line of message

Version 0.6.4

  • Remove unused preference

Version 0.6.3

  • Removed Editor command option
  • Implemented the preferences
  • Bug fixes and code cleanup
  • Wording updates
  • Added notification when a compile error occurs

Version 0.5.1

  • Just README changes

Version 0.5

  • Basic functional release

License

MIT License

Copyright (c) 2020 Vine Code Limited

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.