JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3263425
  • Score
    100M100P100Q213728F
  • License MIT

Get the dependencies of a Stylus file

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

CI npm version npm downloads

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);

License

MIT