Socket
Book a DemoInstallSign in
Socket

cascadify

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cascadify

Recursively find and concatenates styles specified in package.json.

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

cascadify

Build Status

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 B and C, the styles of B and C's will be output before the styles of module A.

Installation

npm install -g cascadify

Usage

Provide the entry point to your app, and pipe output to desired css file:

cascadify ./index.js > output.css

Configuration

Specify styles in an Array in your module's package.json:

{
  "name": "my-package",
  "styles": [
    "my-package-style.css"
  ]
}

Note:

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.

Example

A's package.json:

{
  "name": "a",
  "styles": [
    "a.css"
  ]
}

A's index.js:

require('b')
require('c')

Run cascadify:

Assume B and C have a similar package.json to A.

cascadify ./a/index.js > output.css

output.css

/* CSS B */
/* CSS C */
/* CSS A */

Licence

MIT

Keywords

css

FAQs

Package last updated on 27 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts