Skip to content

Commit

Permalink
bundle all dagre-d3-es in one js
Browse files Browse the repository at this point in the history
  • Loading branch information
tbo47 committed Oct 2, 2024
1 parent 6e16d1b commit 242bf61
Show file tree
Hide file tree
Showing 4 changed files with 579 additions and 122 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ It uses [ES](https://262.ecma-international.org/6.0/) modules, thus the name [da

## Demos

[Simple graph demo](https://codesandbox.io/s/dagre-d3-es-tree-9ywg9) using react, dagre-d3-es.

Clone and run [dagre-es-example](https://github.com/tbo47/dagre-es-example) using angular.
- [simple graph demo](https://codesandbox.io/s/dagre-d3-es-tree-9ywg9) using react
- clone and run [dagre-es-example](https://github.com/tbo47/dagre-es-example) using angular
- [vanilla javascript example](https://tbo47.github.io/dagre-d3-esm_example1/)
- [jsfiddle vanilla javascript example](https://jsfiddle.net/tbo47/fm9ovqeb/)

## Install

Expand Down
5 changes: 5 additions & 0 deletions bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rm -rf dist
OUTFILE=dist/dagre-d3.7.0.11.js
npx esbuild src/index.js --bundle --platform=neutral --packages=external --outfile=$OUTFILE
sed -i '' 's|from "d3";|from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";|' $OUTFILE
sed -i '' 's|from "lodash-es"|from "https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"|' $OUTFILE
Loading

0 comments on commit 242bf61

Please sign in to comment.