Skip to content

dependents/node-detective-stylus

Repository files navigation

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

About

Get the dependencies of a Stylus file

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors