From 6da819c9b05bb06ddd96658aec77e700eb380838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Feb 2019 13:46:45 -0500 Subject: [PATCH 1/3] run full `npm run build`, store artifacts in dist/ --- .circleci/config.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65117ffe925..f2bb760050c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -131,24 +131,18 @@ jobs: - attach_workspace: at: ~/plotly.js - run: - name: Update plot-schema.json - command: node tasks/bundle_plot_schema.js + name: Build dist/ + command: npm run build - store_artifacts: - path: build/plotly.js - destination: /plotly.js - - store_artifacts: - path: dist/plotly.min.js - destination: /plotly.min.js - - store_artifacts: - path: dist/plot-schema.json - destination: /plot-schema.json + path: dist + destination: dist - run: name: Show URLs to build files command: | PROJECT_NUM=45646037 - echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.js - echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.min.js - echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plot-schema.json + echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js + echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js + echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json workflows: version: 2 From 2ee807b7d3d503b4eef44daaed23609202a6247d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Feb 2019 13:49:48 -0500 Subject: [PATCH 2/3] :hocho: not unused bundle_plot_schema.js task --- tasks/bundle_plot_schema.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tasks/bundle_plot_schema.js diff --git a/tasks/bundle_plot_schema.js b/tasks/bundle_plot_schema.js deleted file mode 100644 index 6a5aa71bd5b..00000000000 --- a/tasks/bundle_plot_schema.js +++ /dev/null @@ -1,19 +0,0 @@ -var constants = require('./util/constants'); -var _bundle = require('./util/browserify_wrapper'); -var makeSchema = require('./util/make_schema'); - -/* - * Trimmed down version of ./bundle.js for CI testing - * - * Outputs: - * - * - plotly-with-meta.js bundle in dist/ - * - plot-schema.json in dist/ (for reference) - */ - -_bundle(constants.pathToPlotlyIndex, constants.pathToPlotlyDistWithMeta, { - standalone: 'Plotly', - noCompress: true -}, function() { - makeSchema(constants.pathToPlotlyDistWithMeta, constants.pathToSchema)(); -}); From 2dfda3838565ada43c0fb70f641181fd9a40f31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Feb 2019 13:50:13 -0500 Subject: [PATCH 3/3] run `npm pack` on publish Ci container --- .circleci/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f2bb760050c..d90a808532f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -136,10 +136,20 @@ jobs: - store_artifacts: path: dist destination: dist + - run: + name: Pack tarball + command: | + npm pack + version=$(node -e "console.log(require('./package.json').version)") + mv plotly.js-$version.tgz plotly.js.tgz + - store_artifacts: + path: plotly.js.tgz + destination: /plotly.js.tgz - run: name: Show URLs to build files command: | PROJECT_NUM=45646037 + echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.js.tgz echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json