# broccoli-viz

> `npm install -g broccoli-viz`

Latest version **5.0.0** (published 2019-03-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install broccoli-viz
pnpm add broccoli-viz
yarn add broccoli-viz
bun add broccoli-viz
```

Provides the command `broccoli-viz`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2019-03-11 |
| First published | 2015-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 6.* \|\| 8.* \|\| >= 10.* |
| Dependencies | 6 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Stefan Penner |
| Maintainers | chadhietala, hjdivad, rwjblue, stefanpenner, turbo87 |

## Links

- npm: https://www.npmjs.com/package/broccoli-viz
- Repository: https://github.com/stefanpenner/broccoli-viz
- Issues: https://github.com/stefanpenner/broccoli-viz/issues
- npm.io page: https://npm.io/package/broccoli-viz

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^2.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [deep-diff](https://npm.io/package/deep-diff.md) ^1.0.2
- [sprintf-js](https://npm.io/package/sprintf-js.md) ^1.0.3
- [blank-object](https://npm.io/package/blank-object.md) ^1.0.2
- [matcher-collection](https://npm.io/package/matcher-collection.md) ^2.0.0

## Recent versions

- 5.0.0 (latest) — 2019-03-11
- 4.0.0 — 2017-04-14
- 3.1.3 — 2017-02-25
- 3.1.2 — 2016-12-09
- 3.1.1 — 2016-12-09
- 3.1.0 — 2016-12-09
- 3.0.3 — 2016-08-01
- 3.0.2 — 2016-08-01
- 3.0.1 — 2016-08-01
- 3.0.0 — 2016-08-01
- 2.0.1 — 2015-09-01
- 2.0.0 — 2015-08-31
- 1.0.2 — 2015-08-26
- 1.0.1 — 2015-08-24
- 1.0.0 — 2015-08-24

## README

## Installation

`npm install -g broccoli-viz`

## Usage

Generate a heimdall-compatible JSON from an ember build.

```sh
BROCCOLI_VIZ=1 ember build
# produces broccoli-viz.0.json

BROCCOLI_VIZ=1 ember serve
# produces broccoli-viz.{buildNumber}.json for each build
```

Produce a graphviz dot file from this JSON

```sh
broccoli-viz broccoli-viz.0.json > broccoli-viz.0.dot
```

Produce a PDF of this graph using graphviz (requires graphviz to be installed)

```sh
dot -Tpdf broccoli-viz.0.dot > broccoli-viz.0.pdf
```

You can then explore the PDF to see where time is being spent on your build.

### Stats Filtering

If you want to show stats other than, or in addition to, the time stats, you can
pass a `--stats` option one or more times.  These are simple glob patterns
matched against the full stats key.

If no `--stats` option is passed, the default is `--stats=time.self --stats=time.total`

Examples:

```sh
# Show time stats and individual fs counts
broccoli-viz --stats='time.*' --stats='fs.*.count' broccoli-viz.0.json > broccoli-viz.0.dot

# Show time stats and lstat, mkdir counts
broccoli-viz --stats='time.*' --stats='fs.lstatSync.count' --stats='fs.mkdirSync.count' broccoli-viz.0.json > broccoli-viz.0.dot

# Show all stats
broccoli-viz --stats='*' broccoli-viz.0.json > broccoli-viz.0.dot
```


### Render subtree

If you want to render only a subtree, `--root-id=:id` where `:id` is the id of the
root of the subgraph we wish to render

If no `--root-id` option is passed, the full graph is rendered

Examples:

```sh
# only renders 255 and its descendents
broccoli-viz --root-id=255 broccoli-viz.0.json > broccoli-viz.0.dot
```

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