# webpack-deps

> cli for webpack stats.json dependencies

Latest version **0.0.2** (published 2016-04-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install webpack-deps
pnpm add webpack-deps
yarn add webpack-deps
bun add webpack-deps
```

Provides the command `webpack-deps`.

## 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.2 |
| Published | 2016-04-14 |
| First published | 2016-04-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | wdoug |

## Links

- npm: https://www.npmjs.com/package/webpack-deps
- npm.io page: https://npm.io/package/webpack-deps

## Dependencies (3)

- [archy](https://npm.io/package/archy.md) ^1.0.0
- [yargs](https://npm.io/package/yargs.md) ^4.6.0
- [lodash](https://npm.io/package/lodash.md) ^4.10.0

## Recent versions

- 0.0.2 (latest) — 2016-04-14
- 0.0.1 — 2016-04-14

## README

# Webpack Deps

Small utility to get the list of files that depend on other files in a webpack environment.

## Install
```shell
npm install -g webpack-deps
```

## Get Webpack Stats

In order to use this utility you will first need a webpack stats json file.
This can be created from the command line with:
```shell
webpack --profile --json > webpack-stats.json
```

## Running from the CLI

From the command line `webpack-deps` will take the webpack stats json file as the first argument (defaults to `webpack-stats.json`), and will take a list of files either following the `--files` arg, or piped in via stdin.

Examples:
```shell
webpack-deps stats.json -f components/Home.js components/App.js
```

```shell
echo 'components/Home.js components/App.js' | webpack-deps stats.json
```

### Arguments

| arg | description |
|:---: |:----:|
| first unflagged arg | webpack-stats.json file |
| `--from`, `-f`, or piped in list | starting file list |
|  `--dependencies`, `-d` | show dependency files |
| `--dependents`, `-D` | show dependent files |
| `--count` or `-c` | option to just show count for immediate dependencies / dependents |
| `--levels` or `-l` | option to only go so many levels in the tree |
| `--tree` or `-t` | output ascii tree |

### Usage with Git

The ability to pipe in a list of files can be useful in particular when dealing with git. For example, you can see the files that depend on all the changed files between two different git commits:

```shell
git diff master --name-only | webpack-deps stats.json
```

## License

ISC

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