Miss any of our Open RFC calls?Watch the recordings here! »

detective-postcss

3.0.1 • Public • Published

node-detective-postcss Build Status

Find the dependencies of a CSS file (postCSS dialects)

Supports @import and @value ... from.

npm install --save detective-postcss

It's the CSS (PostCSS dialect) counterpart to detective, detective-amd, detective-es6, detective-sass, detective-scss.

Usage

import fs from 'fs';
import detective from 'detective-postcss';
 
const content = fs.readFileSync('styles.css', 'utf8');
 
// list of imported file names (ex: 'bla.css', 'foo.css', etc.)
const dependencies = detective(content);
 
// or to also detect any url() references to images, fonts, etc.
const allDependencies = detective(content, { url: true });

License

Apache 2.0

Keywords

none

Install

npm i detective-postcss

DownloadsWeekly Downloads

382,642

Version

3.0.1

License

Apache-2.0

Unpacked Size

144 kB

Total Files

11

Last publish

Collaborators

  • avatar