JSPM

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

Find the dependencies of an scss file

Package Exports

  • detective-scss
  • detective-scss/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-scss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

detective-scss CI npm npm

Find the dependencies of an scss file

npm install detective-scss

It's the SCSS counterpart to detective, detective-amd, detective-es6, detective-sass.

Usage

const fs = require('fs');
const detective = require('detective-scss');

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

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

Check out node-sass-lookup if you want to map a sass/scss dependency to a file on your filesystem.

License

MIT