node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

css-deps-analyse

css-deps-analyse

find all /*require("")*/ or /*@require("")*/ in the CSS files

Build Status

USAGE

css/test.css

 
/*require('./a.css');
 *@require('./b.css');  
*/
html {
    margin:0px;
}
 

index.js

var cssdeps = require('css-deps-analyse');
 
var result = cssdeps('css/test.css',{
    word:'require', // defaults 'require', 
    baseDir: '/User/xx/project/'
});
 

methods

var cssdeps = require('css-deps-analyse');
 

cssdeps(src,opts)

src:string | array;

Optionally:

  • opts.word - specify a different function name instead of "require"
  • opts.baseDir - root directory of your project

install

With npm do:

npm install css-deps-analyse

license

MIT