From 1aaf5d9edaaa1d3c39d6f849ddd766ce476e513f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Wed, 20 Jan 2016 14:22:56 -0500 Subject: [PATCH 01/14] Expose trace modularity for users --- lib/bar.js | 9 ++++++++ lib/box.js | 9 ++++++++ lib/choropleth.js | 9 ++++++++ lib/contour.js | 9 ++++++++ lib/core.js | 9 ++++++++ lib/heatmap.js | 9 ++++++++ lib/histogram.js | 9 ++++++++ lib/histogram2d.js | 9 ++++++++ lib/histogram2dcontour.js | 9 ++++++++ lib/mesh3d.js | 9 ++++++++ lib/pie.js | 9 ++++++++ lib/scatter.js | 9 ++++++++ lib/scatter3d.js | 9 ++++++++ lib/scattergeo.js | 9 ++++++++ lib/scattergl.js | 9 ++++++++ lib/surface.js | 9 ++++++++ src/core.js | 45 +++++++++++++++++++++++++++++++++++++++ src/index.js | 39 ++++++--------------------------- 18 files changed, 195 insertions(+), 33 deletions(-) create mode 100644 lib/bar.js create mode 100644 lib/box.js create mode 100644 lib/choropleth.js create mode 100644 lib/contour.js create mode 100644 lib/core.js create mode 100644 lib/heatmap.js create mode 100644 lib/histogram.js create mode 100644 lib/histogram2d.js create mode 100644 lib/histogram2dcontour.js create mode 100644 lib/mesh3d.js create mode 100644 lib/pie.js create mode 100644 lib/scatter.js create mode 100644 lib/scatter3d.js create mode 100644 lib/scattergeo.js create mode 100644 lib/scattergl.js create mode 100644 lib/surface.js create mode 100644 src/core.js diff --git a/lib/bar.js b/lib/bar.js new file mode 100644 index 00000000000..2a8e2b757f5 --- /dev/null +++ b/lib/bar.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/bar'); diff --git a/lib/box.js b/lib/box.js new file mode 100644 index 00000000000..9a64cac7fef --- /dev/null +++ b/lib/box.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/box'); diff --git a/lib/choropleth.js b/lib/choropleth.js new file mode 100644 index 00000000000..11eeb51fe80 --- /dev/null +++ b/lib/choropleth.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/choropleth'); diff --git a/lib/contour.js b/lib/contour.js new file mode 100644 index 00000000000..0994a3f6c00 --- /dev/null +++ b/lib/contour.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/contour'); diff --git a/lib/core.js b/lib/core.js new file mode 100644 index 00000000000..ca083777651 --- /dev/null +++ b/lib/core.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/core'); diff --git a/lib/heatmap.js b/lib/heatmap.js new file mode 100644 index 00000000000..454cb301922 --- /dev/null +++ b/lib/heatmap.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/heatmap'); diff --git a/lib/histogram.js b/lib/histogram.js new file mode 100644 index 00000000000..6ab60e5b8ec --- /dev/null +++ b/lib/histogram.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/histogram'); diff --git a/lib/histogram2d.js b/lib/histogram2d.js new file mode 100644 index 00000000000..87acc3ba825 --- /dev/null +++ b/lib/histogram2d.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/histogram2d'); diff --git a/lib/histogram2dcontour.js b/lib/histogram2dcontour.js new file mode 100644 index 00000000000..683d3679b1b --- /dev/null +++ b/lib/histogram2dcontour.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/histogram2dcontour'); diff --git a/lib/mesh3d.js b/lib/mesh3d.js new file mode 100644 index 00000000000..e281a26ab26 --- /dev/null +++ b/lib/mesh3d.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/mesh3d'); diff --git a/lib/pie.js b/lib/pie.js new file mode 100644 index 00000000000..8be17550c5e --- /dev/null +++ b/lib/pie.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/pie'); diff --git a/lib/scatter.js b/lib/scatter.js new file mode 100644 index 00000000000..f59c36a07b8 --- /dev/null +++ b/lib/scatter.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scatter'); diff --git a/lib/scatter3d.js b/lib/scatter3d.js new file mode 100644 index 00000000000..69dd0512774 --- /dev/null +++ b/lib/scatter3d.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scatter3d'); diff --git a/lib/scattergeo.js b/lib/scattergeo.js new file mode 100644 index 00000000000..491e96851c6 --- /dev/null +++ b/lib/scattergeo.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scattergeo'); diff --git a/lib/scattergl.js b/lib/scattergl.js new file mode 100644 index 00000000000..9e024c57e62 --- /dev/null +++ b/lib/scattergl.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scattergl'); diff --git a/lib/surface.js b/lib/surface.js new file mode 100644 index 00000000000..9662d59d93f --- /dev/null +++ b/lib/surface.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/surface'); diff --git a/src/core.js b/src/core.js new file mode 100644 index 00000000000..b18a741240d --- /dev/null +++ b/src/core.js @@ -0,0 +1,45 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Export the plotly.js API methods. + */ + +var Plotly = require('./plotly'); + +// export the version found in the package.json +exports.version = require('../package.json').version; + +// plot api +exports.plot = Plotly.plot; +exports.newPlot = Plotly.newPlot; +exports.restyle = Plotly.restyle; +exports.relayout = Plotly.relayout; +exports.redraw = Plotly.redraw; +exports.extendTraces = Plotly.extendTraces; +exports.prependTraces = Plotly.prependTraces; +exports.addTraces = Plotly.addTraces; +exports.deleteTraces = Plotly.deleteTraces; +exports.moveTraces = Plotly.moveTraces; +exports.setPlotConfig = require('./plot_api/set_plot_config'); +exports.register = Plotly.register; + +// plot icons +exports.Icons = require('../build/ploticon'); + +// unofficial 'beta' plot methods, use at your own risk +exports.Plots = Plotly.Plots; +exports.Fx = Plotly.Fx; +exports.Snapshot = Plotly.Snapshot; +exports.PlotSchema = Plotly.PlotSchema; +exports.Queue = Plotly.Queue; + +// export d3 used in the bundle +exports.d3 = require('d3'); diff --git a/src/index.js b/src/index.js index 22f621b601d..b6c7c4ae77a 100644 --- a/src/index.js +++ b/src/index.js @@ -9,44 +9,15 @@ 'use strict'; /* - * Export the plotly.js API methods. - * * This file is browserify'ed into a standalone 'Plotly' object. - * */ -var Plotly = require('./plotly'); +var Core = require('./core'); -// export the version found in the package.json -exports.version = require('../package.json').version; +console.log(Object.keys(Core)); -// plot api -exports.plot = Plotly.plot; -exports.newPlot = Plotly.newPlot; -exports.restyle = Plotly.restyle; -exports.relayout = Plotly.relayout; -exports.redraw = Plotly.redraw; -exports.extendTraces = Plotly.extendTraces; -exports.prependTraces = Plotly.prependTraces; -exports.addTraces = Plotly.addTraces; -exports.deleteTraces = Plotly.deleteTraces; -exports.moveTraces = Plotly.moveTraces; -exports.setPlotConfig = require('./plot_api/set_plot_config'); - -// plot icons -exports.Icons = require('../build/ploticon'); - -// unofficial 'beta' plot methods, use at your own risk -exports.Plots = Plotly.Plots; -exports.Fx = Plotly.Fx; -exports.Snapshot = Plotly.Snapshot; -exports.PlotSchema = Plotly.PlotSchema; -exports.Queue = Plotly.Queue; - -// export d3 used in the bundle -exports.d3 = require('d3'); - -Plotly.register([ +// Load all trace modules +Core.register([ require('./traces/bar'), require('./traces/box'), require('./traces/heatmap'), @@ -62,3 +33,5 @@ Plotly.register([ require('./traces/choropleth'), require('./traces/scattergl') ]); + +module.exports = Core; From e7507333f035bff6611417011d6595f90ffa5d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Wed, 20 Jan 2016 14:23:16 -0500 Subject: [PATCH 02/14] Add a few more things to .npmignore --- .npmignore | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.npmignore b/.npmignore index 55981ad3e35..ee62c8a2a7b 100644 --- a/.npmignore +++ b/.npmignore @@ -9,3 +9,12 @@ test dist/extras/mathjax circle.yml +docker-compose.yml +bower.json + +.ackrc +.agignore +.eslintignore +.eslintrc + +npm-debug.log From 60793e79ebf4ccb7f00e0e9c57af62c87acd24bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Wed, 20 Jan 2016 14:22:56 -0500 Subject: [PATCH 03/14] Expose trace modularity for users --- lib/bar.js | 9 ++++++++ lib/box.js | 9 ++++++++ lib/choropleth.js | 9 ++++++++ lib/contour.js | 9 ++++++++ lib/core.js | 9 ++++++++ lib/heatmap.js | 9 ++++++++ lib/histogram.js | 9 ++++++++ lib/histogram2d.js | 9 ++++++++ lib/histogram2dcontour.js | 9 ++++++++ lib/mesh3d.js | 9 ++++++++ lib/pie.js | 9 ++++++++ lib/scatter.js | 9 ++++++++ lib/scatter3d.js | 9 ++++++++ lib/scattergeo.js | 9 ++++++++ lib/scattergl.js | 9 ++++++++ lib/surface.js | 9 ++++++++ src/core.js | 45 +++++++++++++++++++++++++++++++++++++++ src/index.js | 36 +++++-------------------------- 18 files changed, 194 insertions(+), 31 deletions(-) create mode 100644 lib/bar.js create mode 100644 lib/box.js create mode 100644 lib/choropleth.js create mode 100644 lib/contour.js create mode 100644 lib/core.js create mode 100644 lib/heatmap.js create mode 100644 lib/histogram.js create mode 100644 lib/histogram2d.js create mode 100644 lib/histogram2dcontour.js create mode 100644 lib/mesh3d.js create mode 100644 lib/pie.js create mode 100644 lib/scatter.js create mode 100644 lib/scatter3d.js create mode 100644 lib/scattergeo.js create mode 100644 lib/scattergl.js create mode 100644 lib/surface.js create mode 100644 src/core.js diff --git a/lib/bar.js b/lib/bar.js new file mode 100644 index 00000000000..2a8e2b757f5 --- /dev/null +++ b/lib/bar.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/bar'); diff --git a/lib/box.js b/lib/box.js new file mode 100644 index 00000000000..9a64cac7fef --- /dev/null +++ b/lib/box.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/box'); diff --git a/lib/choropleth.js b/lib/choropleth.js new file mode 100644 index 00000000000..11eeb51fe80 --- /dev/null +++ b/lib/choropleth.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/choropleth'); diff --git a/lib/contour.js b/lib/contour.js new file mode 100644 index 00000000000..0994a3f6c00 --- /dev/null +++ b/lib/contour.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/contour'); diff --git a/lib/core.js b/lib/core.js new file mode 100644 index 00000000000..ca083777651 --- /dev/null +++ b/lib/core.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/core'); diff --git a/lib/heatmap.js b/lib/heatmap.js new file mode 100644 index 00000000000..454cb301922 --- /dev/null +++ b/lib/heatmap.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/heatmap'); diff --git a/lib/histogram.js b/lib/histogram.js new file mode 100644 index 00000000000..6ab60e5b8ec --- /dev/null +++ b/lib/histogram.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/histogram'); diff --git a/lib/histogram2d.js b/lib/histogram2d.js new file mode 100644 index 00000000000..87acc3ba825 --- /dev/null +++ b/lib/histogram2d.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/histogram2d'); diff --git a/lib/histogram2dcontour.js b/lib/histogram2dcontour.js new file mode 100644 index 00000000000..683d3679b1b --- /dev/null +++ b/lib/histogram2dcontour.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/histogram2dcontour'); diff --git a/lib/mesh3d.js b/lib/mesh3d.js new file mode 100644 index 00000000000..e281a26ab26 --- /dev/null +++ b/lib/mesh3d.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/mesh3d'); diff --git a/lib/pie.js b/lib/pie.js new file mode 100644 index 00000000000..8be17550c5e --- /dev/null +++ b/lib/pie.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/pie'); diff --git a/lib/scatter.js b/lib/scatter.js new file mode 100644 index 00000000000..f59c36a07b8 --- /dev/null +++ b/lib/scatter.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scatter'); diff --git a/lib/scatter3d.js b/lib/scatter3d.js new file mode 100644 index 00000000000..69dd0512774 --- /dev/null +++ b/lib/scatter3d.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scatter3d'); diff --git a/lib/scattergeo.js b/lib/scattergeo.js new file mode 100644 index 00000000000..491e96851c6 --- /dev/null +++ b/lib/scattergeo.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scattergeo'); diff --git a/lib/scattergl.js b/lib/scattergl.js new file mode 100644 index 00000000000..9e024c57e62 --- /dev/null +++ b/lib/scattergl.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/scattergl'); diff --git a/lib/surface.js b/lib/surface.js new file mode 100644 index 00000000000..9662d59d93f --- /dev/null +++ b/lib/surface.js @@ -0,0 +1,9 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +module.exports = require('../src/traces/surface'); diff --git a/src/core.js b/src/core.js new file mode 100644 index 00000000000..b18a741240d --- /dev/null +++ b/src/core.js @@ -0,0 +1,45 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Export the plotly.js API methods. + */ + +var Plotly = require('./plotly'); + +// export the version found in the package.json +exports.version = require('../package.json').version; + +// plot api +exports.plot = Plotly.plot; +exports.newPlot = Plotly.newPlot; +exports.restyle = Plotly.restyle; +exports.relayout = Plotly.relayout; +exports.redraw = Plotly.redraw; +exports.extendTraces = Plotly.extendTraces; +exports.prependTraces = Plotly.prependTraces; +exports.addTraces = Plotly.addTraces; +exports.deleteTraces = Plotly.deleteTraces; +exports.moveTraces = Plotly.moveTraces; +exports.setPlotConfig = require('./plot_api/set_plot_config'); +exports.register = Plotly.register; + +// plot icons +exports.Icons = require('../build/ploticon'); + +// unofficial 'beta' plot methods, use at your own risk +exports.Plots = Plotly.Plots; +exports.Fx = Plotly.Fx; +exports.Snapshot = Plotly.Snapshot; +exports.PlotSchema = Plotly.PlotSchema; +exports.Queue = Plotly.Queue; + +// export d3 used in the bundle +exports.d3 = require('d3'); diff --git a/src/index.js b/src/index.js index 7c32c585055..ec4413c5afe 100644 --- a/src/index.js +++ b/src/index.js @@ -9,44 +9,16 @@ 'use strict'; /* - * Export the plotly.js API methods. - * * This file is browserify'ed into a standalone 'Plotly' object. - * */ -var Plotly = require('./plotly'); +var Core = require('./core'); // package version injected by `npm run preprocess` exports.version = '1.4.1'; -// plot api -exports.plot = Plotly.plot; -exports.newPlot = Plotly.newPlot; -exports.restyle = Plotly.restyle; -exports.relayout = Plotly.relayout; -exports.redraw = Plotly.redraw; -exports.extendTraces = Plotly.extendTraces; -exports.prependTraces = Plotly.prependTraces; -exports.addTraces = Plotly.addTraces; -exports.deleteTraces = Plotly.deleteTraces; -exports.moveTraces = Plotly.moveTraces; -exports.setPlotConfig = require('./plot_api/set_plot_config'); - -// plot icons -exports.Icons = require('../build/ploticon'); - -// unofficial 'beta' plot methods, use at your own risk -exports.Plots = Plotly.Plots; -exports.Fx = Plotly.Fx; -exports.Snapshot = Plotly.Snapshot; -exports.PlotSchema = Plotly.PlotSchema; -exports.Queue = Plotly.Queue; - -// export d3 used in the bundle -exports.d3 = require('d3'); - -Plotly.register([ +// Load all trace modules +Core.register([ require('./traces/bar'), require('./traces/box'), require('./traces/heatmap'), @@ -62,3 +34,5 @@ Plotly.register([ require('./traces/choropleth'), require('./traces/scattergl') ]); + +module.exports = Core; From 3b7281e5baadbdc453379d5c2bfd061cd4149935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Wed, 20 Jan 2016 14:23:16 -0500 Subject: [PATCH 04/14] Add a few more things to .npmignore --- .npmignore | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.npmignore b/.npmignore index 55981ad3e35..ee62c8a2a7b 100644 --- a/.npmignore +++ b/.npmignore @@ -9,3 +9,12 @@ test dist/extras/mathjax circle.yml +docker-compose.yml +bower.json + +.ackrc +.agignore +.eslintignore +.eslintrc + +npm-debug.log From 38691f837f365b75e79706b2cd0f76f34dad84a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Wed, 20 Jan 2016 17:10:01 -0500 Subject: [PATCH 05/14] finishing touches --- README.md | 30 ++++++++++++++++++++++++++++-- src/core.js | 4 ++-- src/index.js | 3 --- tasks/preprocess.js | 2 +- tasks/util/constants.js | 1 + 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index da6c7a43b04..533c70b652d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![npm version](https://badge.fury.io/js/plotly.js.svg)](https://badge.fury.io/js/plotly.js) +[![npm version](https://badge.fury.io/js/plotly.js.svg)](https://badge.fury.io/js/plotly.js) [![circle ci](https://circleci.com/gh/plotly/plotly.js.png?&style=shield&circle-token=1f42a03b242bd969756fc3e53ede204af9b507c0)](https://circleci.com/gh/plotly/plotly.js) Built on top of [d3.js](http://d3js.org/) and [stack.gl](http://stack.gl/), @@ -40,7 +40,33 @@ npm install plotly.js ``` -Read the [Getting started page](https://plot.ly/javascript/getting-started/) for examples. +#### Webpack Usage + +Plotly.js uses a browserify transform (glslify) to transform shaders. To make this work with Webpack, you will need to install [ify-loader]() and add it to your `webpack.config.json`. + +Read the [Getting started page](https://plot.ly/javascript/getting-started/) for more examples. + +## Modules + +If you would like to reduce the bundle size of plotly.js, you can create a "custom" bundle by using `plotly.js/lib/core`, and loading only the trace types that you need (e.g. `pie` or `choropleth`). The recommended way to do this is by creating a "bundling file": + +```javascript +// custom-plotly.js +var plotlyCore = require('plotly.js/lib/core'); + +// Load in the trace types for pie, and choropleth +plotlyCore.register([ + require('plotly.js/lib/pie'); + require('plotly.js/lib/choropleth'); +]); + +module.exports = customPlotly; +``` +Then elsewhere in your code: + +```javascript +var Plotly = require('./custom-plotly'); +``` ## Bugs and feature requests diff --git a/src/core.js b/src/core.js index b18a741240d..7737895d51e 100644 --- a/src/core.js +++ b/src/core.js @@ -14,8 +14,8 @@ var Plotly = require('./plotly'); -// export the version found in the package.json -exports.version = require('../package.json').version; +// package version injected by `npm run preprocess` +exports.version = '1.4.1'; // plot api exports.plot = Plotly.plot; diff --git a/src/index.js b/src/index.js index ec4413c5afe..a9f3df7a9c7 100644 --- a/src/index.js +++ b/src/index.js @@ -14,9 +14,6 @@ var Core = require('./core'); -// package version injected by `npm run preprocess` -exports.version = '1.4.1'; - // Load all trace modules Core.register([ require('./traces/bar'), diff --git a/tasks/preprocess.js b/tasks/preprocess.js index c6819d19019..4f8ddc883a8 100644 --- a/tasks/preprocess.js +++ b/tasks/preprocess.js @@ -31,5 +31,5 @@ fs.copy(constants.pathToTopojsonSrc, constants.pathToTopojsonDist, ); // inject package version into source index files -updateVersion(constants.pathToPlotlySrc); +updateVersion(constants.pathToPlotlyCore); updateVersion(constants.pathToPlotlyGeoAssetsSrc); diff --git a/tasks/util/constants.js b/tasks/util/constants.js index 574f707dbe5..532be480430 100644 --- a/tasks/util/constants.js +++ b/tasks/util/constants.js @@ -19,6 +19,7 @@ module.exports = { pathToSrc: pathToSrc, pathToPlotlySrc: path.join(pathToSrc, 'index.js'), + pathToPlotlyCore: path.join(pathToSrc, 'core.js'), pathToPlotlyBuild: path.join(pathToBuild, 'plotly.js'), pathToPlotlyDist: path.join(pathToDist, 'plotly.js'), pathToPlotlyDistMin: path.join(pathToDist, 'plotly.min.js'), From 72c540eae4c0314bdab9fd31a2ca9e706108580c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Wed, 20 Jan 2016 18:13:35 -0500 Subject: [PATCH 06/14] Move main entry to index in `lib` dir --- lib/index.js | 35 +++++++++++++++++++++ package.json | 4 +-- src/index.js | 35 --------------------- tasks/util/constants.js | 4 ++- tasks/util/shortcut_paths.js | 1 + test/jasmine/tests/click_test.js | 2 +- test/jasmine/tests/gl_plot_interact_test.js | 2 +- test/jasmine/tests/hover_label_test.js | 2 +- test/jasmine/tests/hover_pie_test.js | 2 +- test/jasmine/tests/plot_api_test.js | 2 +- test/jasmine/tests/plot_interact_test.js | 2 +- 11 files changed, 47 insertions(+), 44 deletions(-) create mode 100644 lib/index.js delete mode 100644 src/index.js diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 00000000000..8a7548e57a7 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,35 @@ +/** +* Copyright 2012-2016, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * This file is browserify'ed into a standalone 'Plotly' object. + */ + +var Core = require('./core'); + +// Load all trace modules +Core.register([ + require('./bar'), + require('./box'), + require('./heatmap'), + require('./histogram'), + require('./histogram2d'), + require('./histogram2dcontour'), + require('./pie'), + require('./contour'), + require('./scatter3d'), + require('./surface'), + require('./mesh3d'), + require('./scattergeo'), + require('./choropleth'), + require('./scattergl') +]); + +module.exports = Core; diff --git a/package.json b/package.json index f078f74f983..10443e07d8e 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "1.4.1", "description": "The open source javascript graphing library that powers plotly", "license": "MIT", - "main": "./src/index.js", - "webpack": "./dist/plotly.min.js", + "main": "./lib/index.js", + "webpack": "./dist/plotly.js", "repository": { "type": "git", "url": "https://github.com/plotly/plotly.js.git" diff --git a/src/index.js b/src/index.js deleted file mode 100644 index a9f3df7a9c7..00000000000 --- a/src/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/** -* Copyright 2012-2016, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * This file is browserify'ed into a standalone 'Plotly' object. - */ - -var Core = require('./core'); - -// Load all trace modules -Core.register([ - require('./traces/bar'), - require('./traces/box'), - require('./traces/heatmap'), - require('./traces/histogram'), - require('./traces/histogram2d'), - require('./traces/histogram2dcontour'), - require('./traces/pie'), - require('./traces/contour'), - require('./traces/scatter3d'), - require('./traces/surface'), - require('./traces/mesh3d'), - require('./traces/scattergeo'), - require('./traces/choropleth'), - require('./traces/scattergl') -]); - -module.exports = Core; diff --git a/tasks/util/constants.js b/tasks/util/constants.js index 532be480430..c95d271722f 100644 --- a/tasks/util/constants.js +++ b/tasks/util/constants.js @@ -4,6 +4,7 @@ var pkg = require('../../package.json'); var pathToRoot = path.join(__dirname, '../../'); var pathToSrc = path.join(pathToRoot, 'src/'); +var pathToLib = path.join(pathToRoot, 'lib/'); var pathToImageTest = path.join(pathToRoot, 'test/image'); var pathToDist = path.join(pathToRoot, 'dist/'); var pathToBuild = path.join(pathToRoot, 'build/'); @@ -17,8 +18,9 @@ var year = (new Date()).getFullYear(); module.exports = { pathToRoot: pathToRoot, pathToSrc: pathToSrc, + pathToLib: pathToLib, - pathToPlotlySrc: path.join(pathToSrc, 'index.js'), + pathToPlotlySrc: path.join(pathToLib, 'index.js'), pathToPlotlyCore: path.join(pathToSrc, 'core.js'), pathToPlotlyBuild: path.join(pathToBuild, 'plotly.js'), pathToPlotlyDist: path.join(pathToDist, 'plotly.js'), diff --git a/tasks/util/shortcut_paths.js b/tasks/util/shortcut_paths.js index e293007c337..5670261f9e4 100644 --- a/tasks/util/shortcut_paths.js +++ b/tasks/util/shortcut_paths.js @@ -10,6 +10,7 @@ var constants = require('./constants'); var shortcutsConfig = { '@src': constants.pathToSrc, + '@lib': constants.pathToLib, '@mocks': constants.pathToTestImageMocks }; diff --git a/test/jasmine/tests/click_test.js b/test/jasmine/tests/click_test.js index 50aa73bf636..18c49542b06 100644 --- a/test/jasmine/tests/click_test.js +++ b/test/jasmine/tests/click_test.js @@ -1,4 +1,4 @@ -var Plotly = require('@src/index'); +var Plotly = require('@lib/index'); var Lib = require('@src/lib'); var createGraphDiv = require('../assets/create_graph_div'); diff --git a/test/jasmine/tests/gl_plot_interact_test.js b/test/jasmine/tests/gl_plot_interact_test.js index 97a0e6e8d9d..2f7bf0b04a5 100644 --- a/test/jasmine/tests/gl_plot_interact_test.js +++ b/test/jasmine/tests/gl_plot_interact_test.js @@ -1,6 +1,6 @@ var d3 = require('d3'); -var Plotly = require('@src/index'); +var Plotly = require('@lib/index'); var createGraphDiv = require('../assets/create_graph_div'); var destroyGraphDiv = require('../assets/destroy_graph_div'); diff --git a/test/jasmine/tests/hover_label_test.js b/test/jasmine/tests/hover_label_test.js index 832427d4a11..e01fcdf606f 100644 --- a/test/jasmine/tests/hover_label_test.js +++ b/test/jasmine/tests/hover_label_test.js @@ -1,6 +1,6 @@ var d3 = require('d3'); -var Plotly = require('@src/index'); +var Plotly = require('@lib/index'); var Fx = require('@src/plots/cartesian/graph_interact'); var Lib = require('@src/lib'); diff --git a/test/jasmine/tests/hover_pie_test.js b/test/jasmine/tests/hover_pie_test.js index 03ea75173d3..c0c6baaa50b 100644 --- a/test/jasmine/tests/hover_pie_test.js +++ b/test/jasmine/tests/hover_pie_test.js @@ -1,4 +1,4 @@ -var Plotly = require('@src/index'); +var Plotly = require('@lib/index'); var Lib = require('@src/lib'); var createGraphDiv = require('../assets/create_graph_div'); diff --git a/test/jasmine/tests/plot_api_test.js b/test/jasmine/tests/plot_api_test.js index de3a660ce80..47fc96b4ffe 100644 --- a/test/jasmine/tests/plot_api_test.js +++ b/test/jasmine/tests/plot_api_test.js @@ -1,4 +1,4 @@ -var Plotly = require('@src'); +var Plotly = require('@lib/index'); var PlotlyInternal = require('@src/plotly'); var Plots = require('@src/plots/plots'); var Lib = require('@src/lib'); diff --git a/test/jasmine/tests/plot_interact_test.js b/test/jasmine/tests/plot_interact_test.js index bdf46fafbd7..74327447fee 100644 --- a/test/jasmine/tests/plot_interact_test.js +++ b/test/jasmine/tests/plot_interact_test.js @@ -1,6 +1,6 @@ var d3 = require('d3'); -var Plotly = require('@src/index'); +var Plotly = require('@lib/index'); var createGraphDiv = require('../assets/create_graph_div'); var destroyGraphDiv = require('../assets/destroy_graph_div'); From e5a0cd9bf1da707703fa98a7cd46856d982117d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Thu, 21 Jan 2016 10:14:05 -0500 Subject: [PATCH 07/14] Change `pathToPlotlySrc` to `pathToPlotlyIndex` --- tasks/bundle.js | 4 ++-- tasks/cibundle.js | 2 +- tasks/util/constants.js | 2 +- tasks/util/make_watchified_bundle.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/bundle.js b/tasks/bundle.js index a74c38992a9..45de5f03649 100644 --- a/tasks/bundle.js +++ b/tasks/bundle.js @@ -35,7 +35,7 @@ catch(e) { // Browserify plotly.js -browserify(constants.pathToPlotlySrc, { +browserify(constants.pathToPlotlyIndex, { debug: DEV, standalone: 'Plotly', transform: [compressAttributes] @@ -65,7 +65,7 @@ browserify(constants.pathToPlotlyGeoAssetsSrc, { // Browserify the plotly.js with meta -browserify(constants.pathToPlotlySrc, { +browserify(constants.pathToPlotlyIndex, { debug: DEV, standalone: 'Plotly' }) diff --git a/tasks/cibundle.js b/tasks/cibundle.js index 8e1db62885d..11ba2c88187 100644 --- a/tasks/cibundle.js +++ b/tasks/cibundle.js @@ -16,7 +16,7 @@ var constants = require('./util/constants'); // Browserify plotly.js -browserify(constants.pathToPlotlySrc, { +browserify(constants.pathToPlotlyIndex, { standalone: 'Plotly', transform: [compressAttributes] }) diff --git a/tasks/util/constants.js b/tasks/util/constants.js index c95d271722f..00017cbd006 100644 --- a/tasks/util/constants.js +++ b/tasks/util/constants.js @@ -20,7 +20,7 @@ module.exports = { pathToSrc: pathToSrc, pathToLib: pathToLib, - pathToPlotlySrc: path.join(pathToLib, 'index.js'), + pathToPlotlyIndex: path.join(pathToLib, 'index.js'), pathToPlotlyCore: path.join(pathToSrc, 'core.js'), pathToPlotlyBuild: path.join(pathToBuild, 'plotly.js'), pathToPlotlyDist: path.join(pathToDist, 'plotly.js'), diff --git a/tasks/util/make_watchified_bundle.js b/tasks/util/make_watchified_bundle.js index d0ed7f3e382..4ec381f9e9a 100644 --- a/tasks/util/make_watchified_bundle.js +++ b/tasks/util/make_watchified_bundle.js @@ -18,7 +18,7 @@ var constants = require('./constants'); * */ module.exports = function makeWatchifiedBundle(onFirstBundleCallback) { - var b = browserify(constants.pathToPlotlySrc, { + var b = browserify(constants.pathToPlotlyIndex, { debug: true, standalone: 'Plotly', transform: [compressAttributes], From b5cb453d0e16ff3e1c5bf8736157bcc0c174b16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Thu, 21 Jan 2016 11:16:22 -0500 Subject: [PATCH 08/14] Update glob for header insertion --- tasks/header.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/header.js b/tasks/header.js index 1d1566f47e0..96b327946c0 100644 --- a/tasks/header.js +++ b/tasks/header.js @@ -32,8 +32,9 @@ pathsDist.forEach(headerLicense); var licenseSrc = constants.licenseSrc; var licenseStr = licenseSrc.substring(2, licenseSrc.length - 2); - -glob(path.join(constants.pathToSrc, '**/*.js'), function(err, files) { +var srcGlob = path.join(constants.pathToSrc, '**/*.js'); +var libGlob = path.join(constants.pathToLib, '**/*.js'); +glob('{' + srcGlob + ',' + libGlob + '}', function(err, files){ files.forEach(function(file) { fs.readFile(file, 'utf-8', function(err, code) { From c0b0439e712837b6d715e9c48e5e7718c72bcb1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Thu, 21 Jan 2016 11:19:33 -0500 Subject: [PATCH 09/14] Move webpack readme below modules --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 533c70b652d..aa03d526cc5 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,6 @@ npm install plotly.js ``` -#### Webpack Usage - -Plotly.js uses a browserify transform (glslify) to transform shaders. To make this work with Webpack, you will need to install [ify-loader]() and add it to your `webpack.config.json`. - Read the [Getting started page](https://plot.ly/javascript/getting-started/) for more examples. ## Modules @@ -68,6 +64,10 @@ Then elsewhere in your code: var Plotly = require('./custom-plotly'); ``` +#### Webpack Usage with Modules + +Plotly.js uses a browserify transform (glslify) to transform shaders. To make the trace module system work with Webpack, you will need to install [ify-loader]() and add it to your `webpack.config.json` for your build to correctly bundle and parse `.glsl` files. + ## Bugs and feature requests Have a bug or a feature request? Please first read the [issues guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md#opening-issues). From 92cd7e4d5a356420e79186ad9484823a1f05c524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Thu, 21 Jan 2016 14:35:31 -0500 Subject: [PATCH 10/14] add info about lib/ --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9081b3d311b..3efef658b46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,6 +106,7 @@ To view the results of a run on CircleCI, download the `build/test_images/` and ### Repo organization - Distributed files are in `dist/` +- CommonJS require-able modules are in `lib/` - Sources files are in `src/`, including the index - Build and repo management scripts are in `tasks/` - All tasks can be run using [`npm run-srcript`](https://docs.npmjs.com/cli/run-script) From 85021230c4cdcba1621eadacc7d0bebdb23c4679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Thu, 21 Jan 2016 14:38:05 -0500 Subject: [PATCH 11/14] update README: - add modules to TOC - add info about version cdn URL - generalize path to `custom-plotly.js` - add info about cwise transform --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index aa03d526cc5..58034024574 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ chart types, including 3D charts, statistical graphs, and SVG maps. ## Table of contents * [Quick start options](#quick-start-options) +* [Modules](#modules) * [Bugs and feature requests](#bugs-and-feature-requests) * [Documentation](#documentation) * [Contributing](#contributing) @@ -38,16 +39,19 @@ npm install plotly.js ```html + + + ``` Read the [Getting started page](https://plot.ly/javascript/getting-started/) for more examples. ## Modules -If you would like to reduce the bundle size of plotly.js, you can create a "custom" bundle by using `plotly.js/lib/core`, and loading only the trace types that you need (e.g. `pie` or `choropleth`). The recommended way to do this is by creating a "bundling file": +If you would like to reduce the bundle size of plotly.js, you can create a *custom* bundle by using `plotly.js/lib/core`, and loading only the trace types that you need (e.g. `pie` or `choropleth`). The recommended way to do this is by creating a *bundling file*: ```javascript -// custom-plotly.js +// in custom-plotly.js var plotlyCore = require('plotly.js/lib/core'); // Load in the trace types for pie, and choropleth @@ -58,15 +62,16 @@ plotlyCore.register([ module.exports = customPlotly; ``` + Then elsewhere in your code: ```javascript -var Plotly = require('./custom-plotly'); +var Plotly = require('./path/to/custom-plotly'); ``` #### Webpack Usage with Modules -Plotly.js uses a browserify transform (glslify) to transform shaders. To make the trace module system work with Webpack, you will need to install [ify-loader]() and add it to your `webpack.config.json` for your build to correctly bundle and parse `.glsl` files. +Browserify [transforms](https://github.com/substack/browserify-handbook#transforms) are required to build plotly.js, namely, [glslify](https://github.com/stackgl/glslify) to transform WebGL shaders and [cwise](https://github.com/scijs/cwise) to compile component-wise array operations. To make the trace module system work with Webpack, you will need to install [ify-loader](https://github.com/hughsk/ify-loader) and add it to your `webpack.config.json` for your build to correctly bundle plotly.js files. ## Bugs and feature requests From fa57b7d8afe96929b6c6b7cc246d2fbf808b971b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Thu, 21 Jan 2016 14:44:00 -0500 Subject: [PATCH 12/14] add info about utf-8 charset --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 58034024574..091b0445097 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,13 @@ Then elsewhere in your code: var Plotly = require('./path/to/custom-plotly'); ``` +**IMPORTANT**: the plotly.js code base contains some non-ascii characters. Therefore, please make sure to set the `chartset` attribute to `"utf-8"` in the script tag that imports your plotly.js bundle. For example: + +```html + +``` + + #### Webpack Usage with Modules Browserify [transforms](https://github.com/substack/browserify-handbook#transforms) are required to build plotly.js, namely, [glslify](https://github.com/stackgl/glslify) to transform WebGL shaders and [cwise](https://github.com/scijs/cwise) to compile component-wise array operations. To make the trace module system work with Webpack, you will need to install [ify-loader](https://github.com/hughsk/ify-loader) and add it to your `webpack.config.json` for your build to correctly bundle plotly.js files. From a00395b667a62ae895dfd606be812899ce88273c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Thu, 21 Jan 2016 14:50:31 -0500 Subject: [PATCH 13/14] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 091b0445097..82b9f9aadc2 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ var plotlyCore = require('plotly.js/lib/core'); // Load in the trace types for pie, and choropleth plotlyCore.register([ - require('plotly.js/lib/pie'); + require('plotly.js/lib/pie'), require('plotly.js/lib/choropleth'); ]); From 66caf0289a0f5c8bbb17e2b3b949afd9c111ecd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Thu, 21 Jan 2016 16:20:37 -0500 Subject: [PATCH 14/14] Fix typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9081b3d311b..d8dab4feb28 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,7 +108,7 @@ To view the results of a run on CircleCI, download the `build/test_images/` and - Distributed files are in `dist/` - Sources files are in `src/`, including the index - Build and repo management scripts are in `tasks/` -- All tasks can be run using [`npm run-srcript`](https://docs.npmjs.com/cli/run-script) +- All tasks can be run using [`npm run-script`](https://docs.npmjs.com/cli/run-script) - Tests are `test/`, they are partitioned into `image` and `jasmine` tests - Test dashboard and image viewer code is in `devtools/` - Non-distributed, built files are in `build/` (most files in here are git-ignored, the css and font built files are exceptions)