Package Exports
- detective-stylus
- detective-stylus/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (detective-stylus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
detective-stylus
Find the dependencies of a Stylus file
npm install detective-stylusIt'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);