Skip to content

Commit a2bccfd

Browse files
committed
add npm and CDN links for main bundles
1 parent 4bc79dd commit a2bccfd

File tree

2 files changed

+40
-16
lines changed

2 files changed

+40
-16
lines changed

dist/README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using distributed files
22

3-
All plotly.js dist bundles inject an object `Plotly` into the global scope.
3+
All plotly.js bundles inject an object `Plotly` into the global scope.
44

55
Import plotly.js as:
66

@@ -39,18 +39,29 @@ Plotly.newPlot(graphDiv, data, layout, {locale: 'de-CH'})
3939

4040
The main plotly.js bundle includes all trace modules.
4141

42-
It be can be imported as minified javascript
43-
- using dist file `dist/plotly.min.js`
44-
- using CDN URL https://cdn.plot.ly/plotly-2.0.0-rc.2.min.js
45-
46-
If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plotly.com/javascript/reference/)), use dist file `dist/plotly-with-meta.js`
47-
4842
The main plotly.js bundles weight in at:
4943

5044
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
5145
|-----------|---------------|----------------------|---------------------|
5246
| 7.9 MB | 3.3 MB | 1015.1 kB | 8.2 MB |
5347

48+
#### CDN links
49+
> https://cdn.plot.ly/plotly-2.0.0-rc.2.js
50+
51+
> https://cdn.plot.ly/plotly-2.0.0-rc.2.min.js
52+
53+
54+
#### npm packages
55+
> [plotly.js](https://www.npmjs.com/package/plotly.js)
56+
57+
> [plotly.js-dist](https://www.npmjs.com/package/plotly.js-dist)
58+
59+
> [plotly.js-dist-min](https://www.npmjs.com/package/plotly.js-dist-min)
60+
61+
#### Meta information
62+
> If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plotly.com/javascript/reference/)), use dist file `dist/plotly-with-meta.js`
63+
---
64+
5465
## Partial bundles
5566

5667
plotly.js also ships with several _partial_ bundles:

tasks/stats.js

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function getInfoContent() {
3434
return [
3535
'# Using distributed files',
3636
'',
37-
'All plotly.js dist bundles inject an object `Plotly` into the global scope.',
37+
'All plotly.js bundles inject an object `Plotly` into the global scope.',
3838
'',
3939
'Import plotly.js as:',
4040
'',
@@ -85,20 +85,33 @@ function getMainBundleInfo() {
8585
'',
8686
'The main plotly.js bundle includes all trace modules.',
8787
'',
88-
'It be can be imported as minified javascript',
89-
'- using dist file `dist/plotly.min.js`',
90-
'- using CDN URL ' + cdnRoot + pkgVersion + MINJS,
91-
'',
92-
'If you would like to have access to the attribute meta information ' +
93-
'(including attribute descriptions as on the [schema reference page](https://plotly.com/javascript/reference/)), ' +
94-
'use dist file `dist/plotly-with-meta.js`',
95-
'',
9688
'The main plotly.js bundles weight in at:',
9789
'',
9890
'| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |',
9991
'|-----------|---------------|----------------------|---------------------|',
10092
'| ' + mainSizes.raw + ' | ' + mainSizes.minified + ' | ' + mainSizes.gzipped + ' | ' + mainSizes.withMeta + ' |',
10193
'',
94+
'#### CDN links',
95+
'> ' + cdnRoot + pkgVersion + JS,
96+
'',
97+
'> ' + cdnRoot + pkgVersion + MINJS,
98+
'',
99+
'',
100+
'#### npm packages',
101+
'> ' + createLink('https://www.npmjs.com/package/', 'plotly.js'),
102+
'',
103+
'> ' + createLink('https://www.npmjs.com/package/', 'plotly.js-dist'),
104+
'',
105+
'> ' + createLink('https://www.npmjs.com/package/', 'plotly.js-dist-min'),
106+
'',
107+
'#### Meta information',
108+
[
109+
'> If you would like to have access to the attribute meta information',
110+
'(including attribute descriptions as on the [schema reference page](https://plotly.com/javascript/reference/)),',
111+
'use dist file `dist/plotly-with-meta.js`'
112+
].join(' '),
113+
'---',
114+
'',
102115
'## Partial bundles',
103116
'',
104117
'plotly.js also ships with several _partial_ bundles:',

0 commit comments

Comments
 (0)