Skip to content
Merged
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions CUSTOM_BUNDLE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
# Custom bundle
You can simply make custom bundles yourself, if none of the [distributed packages](https://github.com/plotly/plotly.js/blob/master/dist/README.md) meet your needs, or you want to make a more optimized bundle file with/without specific traces and transforms.

Install plotly.js, move to plotly.js folder then install plotly.js dependencies:
Clone plotly.js, where the <version> is one of [these](https://github.com/plotly/plotly.js/tags):
```sh
git clone --depth 1 --branch <version> https://github.com/plotly/plotly.js.git
```

Move to plotly.js folder then install plotly.js dependencies:
```sh
cd plotly.js
```

Make sure you have the versions of node/npm that's recommended in the [./CONTRIBUTING.md](./CONTRIBUTING.md#prerequisites) list of Prerequisites.

To download a specific node version look [here](https://nodejs.org/en/download/package-manager).

Install the dependencies
```sh
npm i plotly.js
cd node_modules/plotly.js
npm i
```

Note: You can always switch to another version with:
```sh
git fetch
git checkout <version>
```

By default all traces and transforms are included in the bundle if you simply run:
```sh
npm run custom-bundle
Expand Down