work.suroh.tk/node_modules/detective-sass
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-sass npm npm

Find the dependencies of a sass file

npm install --save detective-sass

Note: This is specific to the .sass style syntax of the Sass preprocessor. For SCSS support, please see node-detective-scss

It's the SASS counterpart to detective, detective-amd, and detective-es6.

Usage

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

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

// list of imported file names (ex: '_foo.sass', '_foo', etc)
var dependencies = detective(content);
  • node-sass-lookup if you want to map a sass/scss dependency to a file on your filesystem.
  • node-precinct if you want to also support finding dependencies for JavaScript and other languages.

License

MIT