0.1.0 • Published 11 years ago
stylus-deps-to-css v0.1.0
stylus-deps-to-css
Searches for stylus dependencies starting from a given root module. The stylus dependencies are declared in the package.json using the custom 'stylus' key.
Install
Install as dev dependency:
npm install stylus-deps-to-css --save-devUsage
var stylusDepsToCss = require('stylus-deps-to-css');
var deps = stylusDepsToCss.create();
var rootDir = 'path/to/module'; // module contains a package.json
deps.convertStylusToCss(rootDir, function (css) {
// do something with `css`
});API
create: returns an object with the helper method(s):convertStylusToCss(modulePath, callback): walks the dependencies starting frommodulePathand looks for thestyluskey in the package.json. Thestyluskey should contain the path to the stylus file in the current module. Dependency modules underdependenciesare checked recursively forstyluskeys in the package.json.
License
MIT
0.1.0
11 years ago