work.suroh.tk/node_modules/detective-stylus
suroh 410082595a init 11ty commit 2019-12-02 13:22:45 +01:00
..
test init 11ty commit 2019-12-02 13:22:45 +01:00
.npmignore 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-stylus npm npm

Find the dependencies of a Stylus file

npm install detective-stylus

It's the Stylus counterpart to detective, detective-amd, detective-es6, and detective-sass

Note: this detective uses a regex to find the @import or @require statements.

Usage

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

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

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