From 3447c80a6a8070885b91f45f35061356f8a80cc2 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Sun, 28 Apr 2019 14:59:47 -0400 Subject: [PATCH] Split build command; one for web, one for package source --- .circleci/config.yml | 2 +- package.json | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7a949aa47..c60efe185 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,7 +37,7 @@ jobs: key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} # Build & Test - - run: yarn build + - run: yarn build:package # https://www.viget.com/articles/using-junit-on-circleci-2-0-with-jest-and-eslint/ - run: name: 'JavaScript Test Suite' diff --git a/package.json b/package.json index 2e9d37adb..25ca3a2e1 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "browser": "dist/index.umd.js", "module": "dist/index.es.js", "jsnext:main": "dist/index.es.js", - "homepage": "http://localhost:5000", + "homepage": "http://localhost:8080", "engines": { "node": ">=8", "npm": ">=5" @@ -18,12 +18,13 @@ "cm": "npx git-cz", "dev": "yarn run preBuild && cross-env PORT=5000 react-scripts start", "dev:debug": "cross-env PORT=5000 react-scripts start", - "build": "yarn run preBuild && node --max-old-space-size=4096 node_modules/rollup/bin/rollup -c", + "build:package": "yarn run preBuild && node --max-old-space-size=4096 node_modules/rollup/bin/rollup -c", + "build:web": "yarn run preBuild && react-scripts build", "lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}", "test": "jest", "test:ci": "jest --ci --runInBand --collectCoverage --reporters=default --reporters=jest-junit && codecov", "staticDeploy": "./generateStaticSite.sh", - "predeploy": "cd example && npm install && yarn run build", + "predeploy": "cd example && npm install && yarn run build:package", "preBuild": "yarn run version && yarn run copy:webworkers", "version": "node -p -e \"'export default \\'' + require('./package.json').version + '\\';'\" > src/version.js", "copy:webworkers": "cpx 'node_modules/cornerstone-wado-image-loader/dist/*.min.js*' public"