@@ -6,7 +6,7 @@ var prettySize = require('prettysize');
66
77var common = require ( './util/common' ) ;
88var constants = require ( './util/constants' ) ;
9- var pkg = require ( '../package.json' ) ;
9+ var pkgVersion = require ( '../package.json' ) . version ;
1010
1111var pathDistREADME = path . join ( constants . pathToDist , 'README.md' ) ;
1212var cdnRoot = 'https://cdn.plot.ly/plotly-' ;
@@ -74,7 +74,7 @@ function getInfoContent() {
7474 'Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.' ,
7575 'Many other localizations are available - here is an example using Swiss-German (de-CH),' ,
7676 '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' ,
7878 'Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.' ,
7979 '' ,
8080 '*After* the plotly.js script tag, add:' ,
@@ -109,12 +109,12 @@ function getMainBundleInfo() {
109109 '' ,
110110 'It be can imported as minified javascript' ,
111111 '- 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 ,
113113 '' ,
114114 'or as raw javascript:' ,
115115 '- using the `plotly.js-dist` npm package (starting in `v1.39.0`)' ,
116116 '- 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 ,
118118 '- using CommonJS with `require(\'plotly.js\')`' ,
119119 '' ,
120120 'If you would like to have access to the attribute meta information ' +
@@ -187,8 +187,8 @@ function makeBundleInfo(pathObj) {
187187 '| ------ | --- |' ,
188188 '| Latest | ' + cdnRoot + name + '-' + 'latest' + JS + ' |' ,
189189 '| 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 + ' |' ,
192192 '' ,
193193 '#### npm package (starting in `v1.39.0`)' ,
194194 '' ,
0 commit comments