Skip to content

Commit 394d9f4

Browse files
committed
point to bundles - simplify dist/README
1 parent fadac71 commit 394d9f4

File tree

3 files changed

+47
-138
lines changed

3 files changed

+47
-138
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Plotly.js can be used to produce dozens of chart types and visualizations, inclu
2020

2121
* [Load from npm (Node.js Package Manager)](#load-from-npm-nodejs-package-manager)
2222
* [Load from Content Delivery Network (CDN)](#load-from-content-delivery-network-cdn)
23-
* [Partial bundles](#partial-bundles)
23+
* [Bundles](#bundles)
2424
* [Alternative ways to require or build plotly.js](#alternative-ways-to-require-or-build-plotlyjs)
2525
* [Documentation](#documentation)
2626
* [Bugs and feature requests](#bugs-and-feature-requests)
@@ -91,10 +91,9 @@ Load relevant MathJax (v2) files *Before* the plotly.js script tag:
9191
<script src="https://cdn.plot.ly/plotly-2.0.0-rc.2.min.js"></script>
9292
```
9393

94-
## Partial bundles
95-
96-
There are two kinds of plotly.js partial bundles:
97-
1. The official partial bundles that are distributed to `npm` and the CDN, described in [the dist README](https://github.com/plotly/plotly.js/blob/master/dist/README.md).
94+
## Bundles
95+
There are two kinds of plotly.js bundles:
96+
1. Complete and partial official bundles that are distributed to `npm` and the `CDN`, described in [the dist README](https://github.com/plotly/plotly.js/blob/master/dist/README.md).
9897
2. Custom bundles you can create yourself, if none of the distributed packages meet your needs.
9998

10099
Use the `traces` option to include just the trace types you need.

dist/README.md

Lines changed: 30 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ Plotly.newPlot(graphDiv, data, layout, {locale: 'de-CH'})
3939

4040
The main plotly.js bundle includes all the official (non-beta) trace modules.
4141

42-
It be can imported as minified javascript
42+
It be can be imported as minified javascript
4343
- using dist file `dist/plotly.min.js`
4444
- using CDN URL https://cdn.plot.ly/plotly-2.0.0-rc.2.min.js
4545

4646
or as raw javascript:
47-
- using the `plotly.js-dist` npm package (starting in `v1.39.0`)
47+
- using the `plotly.js-dist` npm package
4848
- using dist file `dist/plotly.js`
4949
- using CDN URL https://cdn.plot.ly/plotly-2.0.0-rc.2.js
5050
- using CommonJS with `require('plotly.js')`
@@ -59,7 +59,7 @@ The main plotly.js bundle weights in at:
5959

6060
## Partial bundles
6161

62-
Starting in `v1.15.0`, plotly.js also ships with several _partial_ bundles:
62+
plotly.js also ships with several _partial_ bundles:
6363

6464
- [basic](#plotlyjs-basic)
6565
- [cartesian](#plotlyjs-cartesian)
@@ -70,13 +70,11 @@ Starting in `v1.15.0`, plotly.js also ships with several _partial_ bundles:
7070
- [finance](#plotlyjs-finance)
7171
- [strict](#plotlyjs-strict)
7272

73-
Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.
73+
> Each plotly.js partial bundle has a corresponding npm package with no dependencies.
7474
75-
Starting in `v1.50.0`, the minified version of each partial bundle is also published to npm in a separate "dist min" package.
75+
> The minified version of each partial bundle is also published to npm in a separate "dist-min" package.
7676
77-
Starting in `v2.0.0`, the strict partial bundle includes everything except the traces that require function constructors.
78-
Over time we hope to include more of the remaining trace types here, after which we intend to work on other strict CSP issues
79-
such as inline CSS that we may not be able to include in the main bundle.
77+
> The strict partial bundle includes everything except the traces that require function constructors. Over time we hope to include more of the remaining trace types here, after which we intend to work on other strict CSP issues such as inline CSS that we may not be able to include in the main bundle.
8078
8179
### plotly.js basic
8280

@@ -95,7 +93,7 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
9593
| Tagged | https://cdn.plot.ly/plotly-basic-2.0.0-rc.2.js |
9694
| Tagged minified | https://cdn.plot.ly/plotly-basic-2.0.0-rc.2.min.js |
9795

98-
#### npm package (starting in `v1.39.0`)
96+
#### npm package
9997

10098
Install [`plotly.js-basic-dist`](https://www.npmjs.com/package/plotly.js-basic-dist) with
10199
```
@@ -109,26 +107,16 @@ import Plotly from 'plotly.js-basic-dist'
109107

110108
CommonJS usage:
111109
```js
112-
var Plotly = require('plotly.js-basic-dist');
110+
var Plotly = require('plotly.js-basic-dist')
113111
```
114112

115-
#### dist min npm package (starting in `v1.50.0`)
113+
#### dist-min npm package
116114

117115
Install [`plotly.js-basic-dist-min`](https://www.npmjs.com/package/plotly.js-basic-dist-min) with
118116
```
119117
npm install plotly.js-basic-dist-min
120118
```
121119

122-
#### Other plotly.js entry points
123-
124-
| Flavor | Location |
125-
|---------------|----------|
126-
| dist bundle | `dist/plotly-basic.js` |
127-
| dist bundle (minified) | `dist/plotly-basic.min.js` |
128-
| ES6 module | `import Plotly from 'plotly.js/lib/index-basic'` |
129-
| CommonJS | `require('plotly.js/lib/index-basic')` |
130-
131-
132120
### plotly.js cartesian
133121

134122
The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `heatmap`, `histogram`, `histogram2d`, `histogram2dcontour`, `image`, `pie`, `scatter`, `scatterternary` and `violin`.
@@ -146,7 +134,7 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
146134
| Tagged | https://cdn.plot.ly/plotly-cartesian-2.0.0-rc.2.js |
147135
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-2.0.0-rc.2.min.js |
148136

149-
#### npm package (starting in `v1.39.0`)
137+
#### npm package
150138

151139
Install [`plotly.js-cartesian-dist`](https://www.npmjs.com/package/plotly.js-cartesian-dist) with
152140
```
@@ -160,26 +148,16 @@ import Plotly from 'plotly.js-cartesian-dist'
160148

161149
CommonJS usage:
162150
```js
163-
var Plotly = require('plotly.js-cartesian-dist');
151+
var Plotly = require('plotly.js-cartesian-dist')
164152
```
165153

166-
#### dist min npm package (starting in `v1.50.0`)
154+
#### dist-min npm package
167155

168156
Install [`plotly.js-cartesian-dist-min`](https://www.npmjs.com/package/plotly.js-cartesian-dist-min) with
169157
```
170158
npm install plotly.js-cartesian-dist-min
171159
```
172160

173-
#### Other plotly.js entry points
174-
175-
| Flavor | Location |
176-
|---------------|----------|
177-
| dist bundle | `dist/plotly-cartesian.js` |
178-
| dist bundle (minified) | `dist/plotly-cartesian.min.js` |
179-
| ES6 module | `import Plotly from 'plotly.js/lib/index-cartesian'` |
180-
| CommonJS | `require('plotly.js/lib/index-cartesian')` |
181-
182-
183161
### plotly.js geo
184162

185163
The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `scattergeo`.
@@ -197,7 +175,7 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
197175
| Tagged | https://cdn.plot.ly/plotly-geo-2.0.0-rc.2.js |
198176
| Tagged minified | https://cdn.plot.ly/plotly-geo-2.0.0-rc.2.min.js |
199177

200-
#### npm package (starting in `v1.39.0`)
178+
#### npm package
201179

202180
Install [`plotly.js-geo-dist`](https://www.npmjs.com/package/plotly.js-geo-dist) with
203181
```
@@ -211,26 +189,16 @@ import Plotly from 'plotly.js-geo-dist'
211189

212190
CommonJS usage:
213191
```js
214-
var Plotly = require('plotly.js-geo-dist');
192+
var Plotly = require('plotly.js-geo-dist')
215193
```
216194

217-
#### dist min npm package (starting in `v1.50.0`)
195+
#### dist-min npm package
218196

219197
Install [`plotly.js-geo-dist-min`](https://www.npmjs.com/package/plotly.js-geo-dist-min) with
220198
```
221199
npm install plotly.js-geo-dist-min
222200
```
223201

224-
#### Other plotly.js entry points
225-
226-
| Flavor | Location |
227-
|---------------|----------|
228-
| dist bundle | `dist/plotly-geo.js` |
229-
| dist bundle (minified) | `dist/plotly-geo.min.js` |
230-
| ES6 module | `import Plotly from 'plotly.js/lib/index-geo'` |
231-
| CommonJS | `require('plotly.js/lib/index-geo')` |
232-
233-
234202
### plotly.js gl3d
235203

236204
The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`, `scatter`, `scatter3d`, `streamtube`, `surface` and `volume`.
@@ -248,7 +216,7 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
248216
| Tagged | https://cdn.plot.ly/plotly-gl3d-2.0.0-rc.2.js |
249217
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-2.0.0-rc.2.min.js |
250218

251-
#### npm package (starting in `v1.39.0`)
219+
#### npm package
252220

253221
Install [`plotly.js-gl3d-dist`](https://www.npmjs.com/package/plotly.js-gl3d-dist) with
254222
```
@@ -262,26 +230,16 @@ import Plotly from 'plotly.js-gl3d-dist'
262230

263231
CommonJS usage:
264232
```js
265-
var Plotly = require('plotly.js-gl3d-dist');
233+
var Plotly = require('plotly.js-gl3d-dist')
266234
```
267235

268-
#### dist min npm package (starting in `v1.50.0`)
236+
#### dist-min npm package
269237

270238
Install [`plotly.js-gl3d-dist-min`](https://www.npmjs.com/package/plotly.js-gl3d-dist-min) with
271239
```
272240
npm install plotly.js-gl3d-dist-min
273241
```
274242

275-
#### Other plotly.js entry points
276-
277-
| Flavor | Location |
278-
|---------------|----------|
279-
| dist bundle | `dist/plotly-gl3d.js` |
280-
| dist bundle (minified) | `dist/plotly-gl3d.min.js` |
281-
| ES6 module | `import Plotly from 'plotly.js/lib/index-gl3d'` |
282-
| CommonJS | `require('plotly.js/lib/index-gl3d')` |
283-
284-
285243
### plotly.js gl2d
286244

287245
The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `pointcloud`, `scatter`, `scattergl` and `splom`.
@@ -299,7 +257,7 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
299257
| Tagged | https://cdn.plot.ly/plotly-gl2d-2.0.0-rc.2.js |
300258
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-2.0.0-rc.2.min.js |
301259

302-
#### npm package (starting in `v1.39.0`)
260+
#### npm package
303261

304262
Install [`plotly.js-gl2d-dist`](https://www.npmjs.com/package/plotly.js-gl2d-dist) with
305263
```
@@ -313,26 +271,16 @@ import Plotly from 'plotly.js-gl2d-dist'
313271

314272
CommonJS usage:
315273
```js
316-
var Plotly = require('plotly.js-gl2d-dist');
274+
var Plotly = require('plotly.js-gl2d-dist')
317275
```
318276

319-
#### dist min npm package (starting in `v1.50.0`)
277+
#### dist-min npm package
320278

321279
Install [`plotly.js-gl2d-dist-min`](https://www.npmjs.com/package/plotly.js-gl2d-dist-min) with
322280
```
323281
npm install plotly.js-gl2d-dist-min
324282
```
325283

326-
#### Other plotly.js entry points
327-
328-
| Flavor | Location |
329-
|---------------|----------|
330-
| dist bundle | `dist/plotly-gl2d.js` |
331-
| dist bundle (minified) | `dist/plotly-gl2d.min.js` |
332-
| ES6 module | `import Plotly from 'plotly.js/lib/index-gl2d'` |
333-
| CommonJS | `require('plotly.js/lib/index-gl2d')` |
334-
335-
336284
### plotly.js mapbox
337285

338286
The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitymapbox`, `scatter` and `scattermapbox`.
@@ -350,7 +298,7 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
350298
| Tagged | https://cdn.plot.ly/plotly-mapbox-2.0.0-rc.2.js |
351299
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-2.0.0-rc.2.min.js |
352300

353-
#### npm package (starting in `v1.39.0`)
301+
#### npm package
354302

355303
Install [`plotly.js-mapbox-dist`](https://www.npmjs.com/package/plotly.js-mapbox-dist) with
356304
```
@@ -364,26 +312,16 @@ import Plotly from 'plotly.js-mapbox-dist'
364312

365313
CommonJS usage:
366314
```js
367-
var Plotly = require('plotly.js-mapbox-dist');
315+
var Plotly = require('plotly.js-mapbox-dist')
368316
```
369317

370-
#### dist min npm package (starting in `v1.50.0`)
318+
#### dist-min npm package
371319

372320
Install [`plotly.js-mapbox-dist-min`](https://www.npmjs.com/package/plotly.js-mapbox-dist-min) with
373321
```
374322
npm install plotly.js-mapbox-dist-min
375323
```
376324

377-
#### Other plotly.js entry points
378-
379-
| Flavor | Location |
380-
|---------------|----------|
381-
| dist bundle | `dist/plotly-mapbox.js` |
382-
| dist bundle (minified) | `dist/plotly-mapbox.min.js` |
383-
| ES6 module | `import Plotly from 'plotly.js/lib/index-mapbox'` |
384-
| CommonJS | `require('plotly.js/lib/index-mapbox')` |
385-
386-
387325
### plotly.js finance
388326

389327
The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funnel`, `funnelarea`, `histogram`, `indicator`, `ohlc`, `pie`, `scatter` and `waterfall`.
@@ -401,7 +339,7 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
401339
| Tagged | https://cdn.plot.ly/plotly-finance-2.0.0-rc.2.js |
402340
| Tagged minified | https://cdn.plot.ly/plotly-finance-2.0.0-rc.2.min.js |
403341

404-
#### npm package (starting in `v1.39.0`)
342+
#### npm package
405343

406344
Install [`plotly.js-finance-dist`](https://www.npmjs.com/package/plotly.js-finance-dist) with
407345
```
@@ -415,26 +353,16 @@ import Plotly from 'plotly.js-finance-dist'
415353

416354
CommonJS usage:
417355
```js
418-
var Plotly = require('plotly.js-finance-dist');
356+
var Plotly = require('plotly.js-finance-dist')
419357
```
420358

421-
#### dist min npm package (starting in `v1.50.0`)
359+
#### dist-min npm package
422360

423361
Install [`plotly.js-finance-dist-min`](https://www.npmjs.com/package/plotly.js-finance-dist-min) with
424362
```
425363
npm install plotly.js-finance-dist-min
426364
```
427365

428-
#### Other plotly.js entry points
429-
430-
| Flavor | Location |
431-
|---------------|----------|
432-
| dist bundle | `dist/plotly-finance.js` |
433-
| dist bundle (minified) | `dist/plotly-finance.min.js` |
434-
| ES6 module | `import Plotly from 'plotly.js/lib/index-finance'` |
435-
| CommonJS | `require('plotly.js/lib/index-finance')` |
436-
437-
438366
### plotly.js strict
439367

440368
The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `candlestick`, `carpet`, `choropleth`, `choroplethmapbox`, `contour`, `contourcarpet`, `densitymapbox`, `funnel`, `funnelarea`, `heatmap`, `histogram`, `histogram2d`, `histogram2dcontour`, `image`, `indicator`, `ohlc`, `parcats`, `parcoords`, `pie`, `sankey`, `scatter`, `scattercarpet`, `scattergeo`, `scattergl`, `scattermapbox`, `scatterpolar`, `scatterpolargl`, `scatterternary`, `splom`, `sunburst`, `table`, `treemap`, `violin` and `waterfall`.
@@ -452,7 +380,7 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
452380
| Tagged | https://cdn.plot.ly/plotly-strict-2.0.0-rc.2.js |
453381
| Tagged minified | https://cdn.plot.ly/plotly-strict-2.0.0-rc.2.min.js |
454382

455-
#### npm package (starting in `v1.39.0`)
383+
#### npm package
456384

457385
Install [`plotly.js-strict-dist`](https://www.npmjs.com/package/plotly.js-strict-dist) with
458386
```
@@ -466,26 +394,16 @@ import Plotly from 'plotly.js-strict-dist'
466394

467395
CommonJS usage:
468396
```js
469-
var Plotly = require('plotly.js-strict-dist');
397+
var Plotly = require('plotly.js-strict-dist')
470398
```
471399

472-
#### dist min npm package (starting in `v1.50.0`)
400+
#### dist-min npm package
473401

474402
Install [`plotly.js-strict-dist-min`](https://www.npmjs.com/package/plotly.js-strict-dist-min) with
475403
```
476404
npm install plotly.js-strict-dist-min
477405
```
478406

479-
#### Other plotly.js entry points
480-
481-
| Flavor | Location |
482-
|---------------|----------|
483-
| dist bundle | `dist/plotly-strict.js` |
484-
| dist bundle (minified) | `dist/plotly-strict.min.js` |
485-
| ES6 module | `import Plotly from 'plotly.js/lib/index-strict'` |
486-
| CommonJS | `require('plotly.js/lib/index-strict')` |
487-
488-
489407
----------------
490408

491409
_This file is auto-generated by `npm run stats`. Please do not edit this file directly._

0 commit comments

Comments
 (0)