Cascadify aims to work alongside browserify to produce a single CSS file for all your client-side npm dependencies.
Cascadify recursively finds stylesheets, specified by package.json, and ensures they are concatenated in the correct order as per the heirarchy in which they are required.
For example, if module
A depends on modules
C, the styles of
C's will be output
before the styles of module
npm install -g cascadify
Provide the entry point to your app, and pipe output to desired css file:
cascadify ./index.js > output.css
Specify styles in an Array in your module's
Cascadify uses browserify's package finding mechanisms to find required modules, so modules must be required somewhere via a
require call for their styles to be used.
Assume B and C have a similar package.json to A.
cascadify ./a/index.js > output.css
/* CSS B *//* CSS C *//* CSS A */