From ce0f2af87a5c295ce4fab4470a6660130454b3e9 Mon Sep 17 00:00:00 2001 From: archmoj Date: Fri, 4 Jun 2021 09:07:24 -0400 Subject: [PATCH 1/2] trim starting whitespaces --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 09bbead7a6b..6a5124f0ae8 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ To learn and build more with plotly.js please visit [plotly.js documentation](ht ### Un-minified versions are also available on CDN While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles. ```html - + ``` > Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.4. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version. @@ -87,8 +87,8 @@ While non-minified source files may contain characters outside UTF-8, it is reco ### To support MathJax Load relevant MathJax (v2) files *Before* the plotly.js script tag: ```html - - + + ``` ## Bundles From f2d11cd543455d2d293969bd36637a53515145a7 Mon Sep 17 00:00:00 2001 From: archmoj Date: Fri, 4 Jun 2021 09:27:36 -0400 Subject: [PATCH 2/2] improve readme of dist packages - add list of dependencies --- tasks/sync_packages.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tasks/sync_packages.js b/tasks/sync_packages.js index 2de7ec36088..768f26a7f3f 100644 --- a/tasks/sync_packages.js +++ b/tasks/sync_packages.js @@ -116,7 +116,7 @@ function syncPartialBundlePkg(d) { '', 'Contains trace modules ' + common.formatEnumeration(d.traceList) + '.', '', - 'For more info on plotly.js, go to https://github.com/plotly/plotly.js', + 'For more info on plotly.js, go to https://github.com/plotly/plotly.js#readme', '', '## Installation', '', @@ -127,13 +127,14 @@ function syncPartialBundlePkg(d) { '', '```js', '// ES6 module', - 'import Plotly from \'' + d.name + '\';', + 'import Plotly from \'' + d.name + '\'', '', '// CommonJS', - 'var Plotly = require(\'' + d.name + '\');', + 'var Plotly = require(\'' + d.name + '\')', '```', '', - copyrightAndLicense + copyrightAndLicense, + 'Please visit [complete list of dependencies](https://www.npmjs.com/package/plotly.js/v/' + pkg.version + '?activeTab=dependencies).' ]; fs.writeFile( @@ -209,7 +210,7 @@ function syncLocalesPkg(d) { '', d.desc, '', - 'For more info on plotly.js, go to https://github.com/plotly/plotly.js', + 'For more info on plotly.js, go to https://github.com/plotly/plotly.js#readme', '', '## Installation', '', @@ -222,15 +223,15 @@ function syncLocalesPkg(d) { '', '```js', '// ES6 module', - 'import Plotly from \'plotly.js\';', - 'import locale from \'' + d.name + '/fr' + '\';', + 'import Plotly from \'plotly.js\'', + 'import locale from \'' + d.name + '/fr' + '\'', '', '// CommonJS', - 'var Plotly = require(\'plotly.js\');', - 'var locale = require(\'' + d.name + '/fr\');', + 'var Plotly = require(\'plotly.js\')', + 'var locale = require(\'' + d.name + '/fr\')', '', '// then', - 'Plotly.register(locale);', + 'Plotly.register(locale)', 'Plotly.setPlotConfig({locale: \'fr\'})', '```', '', @@ -248,7 +249,7 @@ function syncLocalesPkg(d) { var cnt = [constants.licenseDist, '']; localeFiles.forEach(function(f) { var n = path.basename(f, '.js'); - cnt.push('exports[\'' + n + '\'] = require(\'./' + n + '.js\');'); + cnt.push('exports[\'' + n + '\'] = require(\'./' + n + '.js\')'); }); cnt.push('');