# cascadify

> Recursively find and concatenates styles specified in package.json.

Latest version **0.0.7** (published 2013-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install cascadify
pnpm add cascadify
yarn add cascadify
bun add cascadify
```

Provides the command `cascadify`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2013-09-27 |
| First published | 2013-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Tim Oxley |
| Maintainers | timoxley |
| Keywords | css, browserify, concatenate, cat, bundle, styles |

## Links

- npm: https://www.npmjs.com/package/cascadify
- Repository: https://github.com/timoxley/cascadify
- Issues: https://github.com/timoxley/cascadify/issues
- npm.io page: https://npm.io/package/cascadify

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ~0.7.2
- [parents](https://npm.io/package/parents.md) 0.0.1
- [through](https://npm.io/package/through.md) ~2.3.4
- [commander](https://npm.io/package/commander.md) ~1.3.0
- [browserify](https://npm.io/package/browserify.md) ~2.33.0
- [map-stream](https://npm.io/package/map-stream.md) 0.0.2
- [concat-stream](https://npm.io/package/concat-stream.md) ~1.0.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2013-09-27
- 0.0.6 — 2013-07-27
- 0.0.5 — 2013-07-15
- 0.0.4 — 2013-07-15
- 0.0.2 — 2013-07-14

## README

# cascadify

[![Build Status](https://travis-ci.org/timoxley/cascadify.png?branch=master)](https://travis-ci.org/timoxley/cascadify)

Cascadify aims to work alongside [browserify](https://github.com/substack/node-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`:

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

#### Note: 

Cascadify uses [browserify](https://github.com/substack/node-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:
```json
{
  "name": "a",
  "styles": [
    "a.css"
  ]
}
```

#### A's index.js:
```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
/* CSS B */
/* CSS C */
/* CSS A */
```



## Licence

MIT

---
_Source: https://npm.io/package/cascadify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
