[go: up one dir, main page]

detective-sass

6.0.0 • Public • Published

detective-sass

CI npm version npm downloads

Find the dependencies of a sass file

npm install detective-sass

Note: This is specific to the .sass style syntax of the Sass preprocessor. For SCSS support, please see node-detective-scss.

It's the SASS counterpart to detective, detective-amd, and detective-es6.

Usage

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

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

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

// or to also detect any url() references to images, fonts, etc.
const allDependencies = detective(content, { url: true });

Options

  • url (optional): (Boolean) also detect any url() references to images, fonts, etc.

Related

  • node-sass-lookup if you want to map a sass/scss dependency to a file on your filesystem.
  • node-precinct if you want to also support finding dependencies for JavaScript and other languages.

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
6.0.0325,337latest

Version History

VersionDownloads (Last 7 Days)Published
6.0.0325,337
5.0.3346,476
5.0.21
5.0.12
5.0.0232
4.1.3153,875
4.1.24,486
4.1.116,923
4.1.01,848
4.0.122,806
3.0.2305,950
3.0.162,293
3.0.0160
2.0.14,181
2.0.03,420
1.2.230
1.2.128
1.2.018
1.1.014
1.0.416
1.0.313
1.0.216
1.0.115
1.0.014
0.0.014

Package Sidebar

Install

npm i detective-sass

Weekly Downloads

1,052,094

Version

6.0.0

License

MIT

Unpacked Size

6.65 kB

Total Files

4

Last publish

Collaborators

  • pahen
  • xhmikosr
  • mrjoelkemp