# website-dependency-graph

> Command-line tool to generate dependency graph from static website files

Latest version **1.0.0** (published 2020-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install website-dependency-graph
pnpm add website-dependency-graph
yarn add website-dependency-graph
bun add website-dependency-graph
```

Provides the command `wdg`.

## 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.0 |
| Published | 2020-07-26 |
| First published | 2020-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0 |
| Dependencies | 16 |
| Unpacked size | 27.1 KB |
| Known vulnerabilities | 0 (+8 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Rajeesh C V |
| Maintainers | cvrajeesh |
| Keywords | website, dependency, graph, static, asset, wdg |

## Links

- npm: https://www.npmjs.com/package/website-dependency-graph
- Repository: https://github.com/cvrajeesh/website-dependency-graph
- Homepage: https://github.com/cvrajeesh/website-dependency-graph#readme
- Issues: https://github.com/cvrajeesh/website-dependency-graph/issues
- npm.io page: https://npm.io/package/website-dependency-graph

## Dependencies (16)

- [ora](https://npm.io/package/ora.md) 4.0.5
- [url](https://npm.io/package/url.md) 0.11.0
- [open](https://npm.io/package/open.md) 7.1.0
- [yargs](https://npm.io/package/yargs.md) 15.4.1
- [postcss](https://npm.io/package/postcss.md) 7.0.32
- [posthtml](https://npm.io/package/posthtml.md) 0.13.1
- [fast-glob](https://npm.io/package/fast-glob.md) 3.2.4
- [mime-types](https://npm.io/package/mime-types.md) 2.1.27
- [@types/node](https://npm.io/package/@types/node.md) 12.12.6
- [@babel/parser](https://npm.io/package/@babel/parser.md) 7.10.5
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) 7.10.5
- [posthtml-parser](https://npm.io/package/posthtml-parser.md) 0.4.2
- [posthtml-render](https://npm.io/package/posthtml-render.md) 1.2.2
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) 7.10.4
- [postcss-safe-parser](https://npm.io/package/postcss-safe-parser.md) 4.0.2
- [postcss-values-parser](https://npm.io/package/postcss-values-parser.md) 3.2.1

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-07-26

## README

# Website Dependency Graph (wdg)

A command-line tool to generate assets dependency graph from static website files.

Analyzes all the HTML, JavaScript and CSS files to find all the dependent assets, then generates a dependency graph. This graph includes only the internal assets, any assets linked to external URLs are excluded.

![wdg-demo](https://media.giphy.com/media/Kf5hCcSqRbLOeBn6vT/source.gif)

## Getting started

###

```
# Install using NPM
npm install -g website-dependency-graph

# Install using Yarn
yarn global add website-dependency-graph
```

### Usage

```
$ wdg <source dir> [--output]
```

`wdg` requires a path to your website directory as an argument to generate the dependency graph.

Supports two output formats

- `html` [default] - generates an HTML file in temp directory.
- `dot` - generates dependency graph in [Graphviz](https://graphviz.org) DOT format and writes to standard output.

e.g. generate dependency graph image using Graphviz `dot` command-line utility.

```
$ wdg <source dir> --output dot | dot -Tpng -o website.png
```

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