bs-dependency-graph

2.1.0 • Public • Published

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

Package Sidebar

Install

npm i bs-dependency-graph

Weekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

14.9 kB

Total Files

15

Last publish

Collaborators

  • ristostevcev