sass watching multiple directories
I'm hoping you've already tried it, but you can just add all folders into one command line:
sass --watch path/to/sass1:path/to/css1 path/to/sass2:path/to/css2 path/to/sass3:path/to/css3
how to watch changes in whole directory/folder containing many sass files
Simply use the command sass --watch <input folder>:<output folder>
, like this:
$ ls -l
css/ sass/
$ sass --watch sass:css
Where <input folder>
contains the Sass files and <output folder>
that hosts the generated CSS files.
how to watch changes in whole directory/folder containing many sass files
Simply use the command sass --watch <input folder>:<output folder>
, like this:
$ ls -l
css/ sass/
$ sass --watch sass:css
Where <input folder>
contains the Sass files and <output folder>
that hosts the generated CSS files.
Watch multiple directories using gulp-sass
You need to provide the relative path to the sass files that you're importing. So change the import code to be something like this:
@import "forms";
@import "../../common/styles/_mixins";
@import "../../common/styles/_common";
Then, since you are importing the files from ./common/styles
you should only need gulp to target the scss file in ./blog/styles
. So your gulp function could look something like this:
gulp.task('sass', function() {
gulp.src('./blog/styles/blog.scss')
.pipe(sass())
.pipe(gulp.dest('./dist/style.css'));
});
Related Topics
How to Float an Element Left with Full Height of the Wrapper
Bootstrap Navbar Collapse Media-Query on Custom Width
Use CSS to Hide Contents on Print
Colspan Messes with Fixed Width Table
CSS - Show/Hide Content with Anchor Name
Why Is CSS Grid Row Height Different in Safari
In Less CSS How to Get Less to Watch a Bunch of Files But Compile a Different File When They Change
Should I Use More Than One CSS Sheet
Position Element Over Background Image. But the Bg Img Changes Size with the Window. CSS
How to Prevent Division When Using Variables Separated by a Slash in CSS Property Values
How to Filter and Show Only Applied CSS in Chrome Developer Tools (Like Firebug in Firefox)
What Does an Asterisk Before an Equal Sign Mean (*=) ? What About the Exclamation Mark