Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elaborate on custom bundle instructions #7101

Merged
merged 25 commits into from
Aug 13, 2024
Merged
Changes from 14 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
22 changes: 19 additions & 3 deletions CUSTOM_BUNDLE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Custom bundle
You can simply make custom bundles yourself, if none of the [distributed packages](https:/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:/plotly/plotly.js/tags):
```sh
git clone --depth 1 --branch <version> https:/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
birkskyum marked this conversation as resolved.
Show resolved Hide resolved

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

Note: You can always switch to another version with:
birkskyum marked this conversation as resolved.
Show resolved Hide resolved
```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