# tree-pic

> Generate a picture of a file's dependency tree

Latest version **1.0.1** (published 2016-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install tree-pic
pnpm add tree-pic
yarn add tree-pic
bun add tree-pic
```

## 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 | 1.0.1 |
| Published | 2016-07-05 |
| First published | 2016-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joel Kemp |
| Maintainers | mrjoelkemp |
| Keywords | tree, dependency, image, ast, file, png, es6, amd, commonjs, sass |

## Links

- npm: https://www.npmjs.com/package/tree-pic
- Repository: https://github.com/dependents/node-tree-pic
- Homepage: https://github.com/dependents/node-tree-pic#readme
- Issues: https://github.com/dependents/node-tree-pic/issues
- npm.io page: https://npm.io/package/tree-pic

## Dependencies (4)

- [q](https://npm.io/package/q.md) ^1.4.1
- [debug](https://npm.io/package/debug.md) ^2.2.0
- [graphviz](https://npm.io/package/graphviz.md) 0.0.8
- [dependency-tree](https://npm.io/package/dependency-tree.md) ^5.4.0

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-07-05
- 1.0.0 — 2016-06-13

## README

### tree-pic [![npm](http://img.shields.io/npm/v/tree-pic.svg)](https://npmjs.org/package/tree-pic) [![npm](http://img.shields.io/npm/dm/tree-pic.svg)](https://npmjs.org/package/tree-pic)

> Generate a picture of a file's dependency tree

`npm install tree-pic`

*Heavily inspired by [pahen/madge](https://github.com/pahen/madge).*

### Graphviz dependency

In order to generate the output image, you need to have Graphviz installed.

##### Mac OS X

	$ sudo port install graphviz

OR

	$ brew install graphviz

##### Ubuntu

	$ sudo apt-get install graphviz

### Usage

```js
var treePic = require('tree-pic');

treePic({
  filename: 'path/to/file',
  directory: 'path/to/all/files',
  // optional
  imagePath: 'desired/path/for/generated/image.png',
  requireConfig: 'path/to/requirejs/config.js',
  webpackConfig: 'path/to/webpack.config.js'
})
.then(function(pathOfGeneratedImage) {
  // At this point, the image was already created
});
```

* Under the hood, this module uses [dependency-tree](https://github.com/mrjoelkemp/node-dependency-tree) to generate the tree structure, so we can take pictures of any module types (JS, Sass, Stylus) supported by that module.

### License

MIT

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