Script to generate file with cached sass imports.
npm i -D @dbetka/sass-watcher
With arguments in package.json
{
"scripts": {
"sass-watcher": "sass-watcher --input-dir src/style/ --output src/style/__cache__/index.sass"
}
}
With config file in package.json
{
"scripts": {
"sass-watcher": "sass-watcher --config configs/sass-watcher.json"
}
}
{
"input-dir": "src/style/auto-import",
"output": "src/style/__cache__/index.sass"
}
src/style/index.sass file
@import "__cache__/index"
// Rest imports