Generates a make
-style list of dependencies for a SASS file and prints
it to standard output. Nested import statements are supported.
Usage: sass-deps.rb [options] SASS-file
-h, --help Display this screen and exit.
-e, --empty-target Optional flag to output the rule even if the target has no dependencies.
-t, --target NAME Optional. The name of the target. If omitted the name of the SASS file is used with the css extension.
$ cat style.scss
@import "variables";
@import "reset";
@import "button";
$ ./sass-deps.rb style.scss
style.css: _variables.scss _reset.scss _button.scss
_variables.scss:
_reset.scss:
_button.scss:
$ ./sass-deps.rb style.scss -t build/styles/style.css
build/styles/style.css: _variables.scss _reset.scss _button.scss
_variables.scss:
_reset.scss:
_button.scss:
- Does not support multiple targets for the same set of dependencies.