1.0.2 • Published 6 years ago

import-grapher v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Import Grapher

Uses Parcel in the background to generate an asset graph

Install

npm install import-grapher

CLI

Generates a import-graph.json file in the current working directory.

importgrapher <entrypoint>

Options

  • --no-cache, disables the caching mechanism
  • --out-file <filename>, sets the output filename

API

You can also use Import Grapher as a Node.js API

const importGrapher = require('import-grapher');
const path = require('path');

async function getGraph() {
  // graph = a JSON Object containing the asset import tree
  let graph = await importGrapher(path.join(__dirname, './index.js'));

  // do something with the graph...
}

getGraph();

License

MIT

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago