@@ -6,7 +6,7 @@ var prettySize = require('prettysize');
6
6
7
7
var common = require ( './util/common' ) ;
8
8
var constants = require ( './util/constants' ) ;
9
- var pkg = require ( '../package.json' ) ;
9
+ var pkgVersion = require ( '../package.json' ) . version ;
10
10
11
11
var pathDistREADME = path . join ( constants . pathToDist , 'README.md' ) ;
12
12
var cdnRoot = 'https://cdn.plot.ly/plotly-' ;
@@ -74,7 +74,7 @@ function getInfoContent() {
74
74
'Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.' ,
75
75
'Many other localizations are available - here is an example using Swiss-German (de-CH),' ,
76
76
'see the contents of this directory for the full list.' ,
77
- 'They are also available on our CDN as ' + cdnRoot + 'locale-de-ch-' + 'latest' + '.js OR ' + cdnRoot + 'locale-de-ch-' + pkg . version + '.js' ,
77
+ 'They are also available on our CDN as ' + cdnRoot + 'locale-de-ch-' + 'latest' + '.js OR ' + cdnRoot + 'locale-de-ch-' + pkgVersion + '.js' ,
78
78
'Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.' ,
79
79
'' ,
80
80
'*After* the plotly.js script tag, add:' ,
@@ -109,12 +109,12 @@ function getMainBundleInfo() {
109
109
'' ,
110
110
'It be can imported as minified javascript' ,
111
111
'- using dist file `dist/plotly.min.js`' ,
112
- '- using CDN URL ' + cdnRoot + 'latest' + MINJS + ' OR ' + cdnRoot + pkg . version + MINJS ,
112
+ '- using CDN URL ' + cdnRoot + 'latest' + MINJS + ' OR ' + cdnRoot + pkgVersion + MINJS ,
113
113
'' ,
114
114
'or as raw javascript:' ,
115
115
'- using the `plotly.js-dist` npm package (starting in `v1.39.0`)' ,
116
116
'- using dist file `dist/plotly.js`' ,
117
- '- using CDN URL ' + cdnRoot + 'latest' + JS + ' OR ' + cdnRoot + pkg . version + JS ,
117
+ '- using CDN URL ' + cdnRoot + 'latest' + JS + ' OR ' + cdnRoot + pkgVersion + JS ,
118
118
'- using CommonJS with `require(\'plotly.js\')`' ,
119
119
'' ,
120
120
'If you would like to have access to the attribute meta information ' +
@@ -187,8 +187,8 @@ function makeBundleInfo(pathObj) {
187
187
'| ------ | --- |' ,
188
188
'| Latest | ' + cdnRoot + name + '-' + 'latest' + JS + ' |' ,
189
189
'| Latest minified | ' + cdnRoot + name + '-' + 'latest' + MINJS + ' |' ,
190
- '| Tagged | ' + cdnRoot + name + '-' + pkg . version + JS + ' |' ,
191
- '| Tagged minified | ' + cdnRoot + name + '-' + pkg . version + MINJS + ' |' ,
190
+ '| Tagged | ' + cdnRoot + name + '-' + pkgVersion + JS + ' |' ,
191
+ '| Tagged minified | ' + cdnRoot + name + '-' + pkgVersion + MINJS + ' |' ,
192
192
'' ,
193
193
'#### npm package (starting in `v1.39.0`)' ,
194
194
'' ,
0 commit comments