detective-stylus
v5.0.0
Published
Get the dependencies of a Stylus file
Downloads
6,201,768
Readme
detective-stylus
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
const fs = require('fs');
const detective = require('detective-stylus');
const content = fs.readFileSync('styles.styl', 'utf8');
// list of imported file names (ex: '_foo.styl', '_foo', etc)
const dependencies = detective(content);