1.0.1 • Published 7 years ago

periscope-dagre v1.0.1

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

Fork to Support Webpack

dagre - Graph layout for JavaScript

Build Status

Dagre is a JavaScript library that makes it easy to lay out directed graphs on the client-side.

For more details, including examples and configuration options, please see our wiki.

This project is not being actively developed or maintained.

License

dagre is licensed under the terms of the MIT License. See the LICENSE file for details.

Webpack Usage

  1. Include the dagre-webpack bower component. I've only used the bower-webpack-plugin to do this e.g.
new BowerPlugin({
  modulesDirectories: ['..\..\bower_components'],
  searchResolveModulesDirectories: false
}),
  1. (Optional) In your webpack.config, expose dagre-webpack as dagre. This is a nicety that allows you to avoid calling require('dagre-webpack') on each page that needs it.
new webpack.ProvidePlugin({
  ...
  dagre: 'dagre-webpack'
  ...
});
  1. Instantiate your graph (assuming you completed step 1)
var g = new dagre.graphlib.Graph();

// Call g.SetEdge and g.SetNode and create your graph

dagre.layout(g);
1.0.1

7 years ago

1.0.0

7 years ago

0.7.9

7 years ago

0.7.7

7 years ago

0.7.6

7 years ago

0.7.5-pre

7 years ago