Skip to content
Get the dependencies of a Stylus file
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
Readme.md
index.js
package.json

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);
You can’t perform that action at this time.