2.1.0 • Published 5 years ago

bs-dependency-graph v2.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

bs-dependency-graph

Build Status Latest release License

Generates the module dependency graph for a bucklescript project

Usage

Install it for your bucklescript project:

$ npm install --save-dev bs-dependency-graph

Optionally, you can use json-to-dot to convert it to the dot format:

$ npm install --save-dev json-to-dot

And if you have graphviz installed, you can convert the dot format to an image using the dot command, and then preview it with ImageMagick.

Combining these together, you can add it as a command in your package.json:

{
  "name": "bs-some-project",
  ...

  "scripts": {
    "graph:dot": "bs-dependency-graph | json-to-dot > graph.dot",
    "graph:image": "dot -Tpng graph.dot -o graph.png",
    "graph:view": "display graph.png",
    "graph": "npm run graph:dot && npm run graph:image"
  },
  ...
}

How it Works

The library fetches all of your project files based on the settings in bsconfig.json and then runs ocamldep on the files to get the dependency graph

License

See LICENSE

2.1.0

5 years ago

2.0.0

5 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago