Wednesday, 10 May 2017

node-sass watch and compile to a single file

I am a bit new to sass, but I am starting a new project and figured why not dive in and learn as I go! So my question is this...

I have a directory structure that looks like this:

/sass
-->bootstrap
-->theme
-->_bootstrap.scss
-->_theme.scss

I want to be able to set npm-sass to watch for changes to any the entire directory (including bootstrap) and compile the sass into a single file located at:

/css/theme.min.css

I know that the -w sets the watch, and that --output-style compressed does the job of minifying, but how would i set this to watch the directory and only compile a single file?

Hopefully I asked the question well enough :)



via Sandra Willford

No comments:

Post a Comment