detective-stylus
Get the dependencies of a Stylus file
Last updated 6 months ago by xhmikosr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install detective-stylus 
SYNC missed versions from official npm registry.

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

ESM

import fs from 'node:fs';
import detective from 'detective-stylus';

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

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

CommonJS

const { default: detective } = require('detective-stylus');

License

MIT

Current Tags

  • 6.0.0                                ...           latest (6 months ago)

11 Versions

  • 6.0.0                                ...           6 months ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           3 years ago
  • 4.0.0                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           11 years ago
Downloads
Total 40
Today 0
This Week 4
This Month 19
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE