work.suroh.tk/node_modules/detective-scss
suroh 410082595a init 11ty commit 2019-12-02 13:22:45 +01:00
..
Readme.md init 11ty commit 2019-12-02 13:22:45 +01:00
index.js init 11ty commit 2019-12-02 13:22:45 +01:00
package.json init 11ty commit 2019-12-02 13:22:45 +01:00

Readme.md

detective-scss npm npm

Find the dependencies of an scss file

npm install --save detective-scss

It's the SCSS counterpart to detective, detective-amd, detective-es6, detective-sass.

Usage

var detective = require('detective-scss');

var content = fs.readFileSync('styles.scss', 'utf8');

// list of imported file names (ex: '_foo.scss', '_foo', etc)
var dependencies = detective(content);

Check out node-sass-lookup if you want to map a sass/scss dependency to a file on your filesystem.

License

MIT