Name: rocketsass
Owner: r/SpaceX
Description: A smart Sass command line utility that compiles each file to a specific target destination.
Created: 2017-11-30 02:53:28.0
Updated: 2017-12-02 04:54:11.0
Pushed: 2017-12-02 04:54:10.0
Size: 45
Language: CSS
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A smart Sass compiler that compiles each file to a specific target destination.
For installing for use as a command line utility, install globally:
m install -g rocketsass
To install for use in node scripts, install locally as a development dependency:
m install --save-dev rocketsass
Or as a standard dependency:
m install --save rocketsass
In each Sass/SCSS file, add a comment header that looks like this:
ompileDest = ./out/css/style.css */
You can also add options separated by commas:
ompileDest = ./out/css/style.css, style = compressed */
It must all be on the first line.
Then, simply run rocketsass
from the command line:
cketsass [path]
where [path]
is the path to your sass directory, eg. ./scss/
. The default path is ./css/scss/
.
mport RocketSass
t rocketsass = require('rocketsass');
ompile all sass files in a directory
etsass.compile('./scss/', {
Ignore files starting with this string, optional
nore: '_',
CSS output style (see below), optional
yle: 'nested'
By default, RocketSass ignores Sass/SCSS files starting with '_'. You can override that by passing the option -i
or --include
.
cketsass [path] -i '' # Include all files
cketsass [path] -i exclude_ # Ignore all files starting with 'exclude_'
cketsass [path] -i '.' # Ignore dotfiles
Passing rocketsass
the option -s
or --style
can also set the output style of the CSS which takes one of the standard Sass output styles. This value overridden by the style set in a file's header. By default, the style is nested
.