gulp-cached-sass
This module is used with gulp-cached.
Inspired by gulpを使ってsassの@importを解決しつつ差分ビルドをする - Qiita
What I want to do...
Now
const src dest = ;const gulpSass = ;const gulpCached = ; const sass = { const srcPath = './src/scss/**/*.scss'; const destPath = './dest/css'; const gulpCachedName = 'sass'; return ;}; const watchSass = ; exportsdefault = ;exportssass = sass;
Problem
// style.scss ;;
if update modules/_header.scss
, but don't run gulp task.
because, this Sass file named with a leading underscore.
Partials
You can create partial Sass files that contain little snippets of CSS that you can include in other Sass files. This is a great way to modularize your CSS and help keep things easier to maintain. A partial is simply a Sass file named with a leading underscore. You might name it something like _partial.scss. The underscore lets Sass know that the file is only a partial file and that it should not be generated into a CSS file. Sass partials are used with the @import directive.
I need run task runner, because updated @import file written to "style.scss".
In the future I would like to do this
const src dest = ;const gulpSass = ;const gulpCached = ;const gulpCachedSass = ; const sass = { const srcPath = './src/scss/**/*.scss'; const destPath = './dest/css'; const gulpCachedName = 'sass'; const baseDir = './src/scss/'; return ;}; const watchSass = ; exportsdefault = ;exportssass = sass;
if update modules/_header.scss
, run gulp task & compile style.scss, and @import file written to any *.scss.