From 675f91814942db1d3e2429e0c7cd0c89a7f5912f Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 24 Jul 2018 18:27:16 +0800 Subject: [PATCH] chore: add cross-env and update ci config --- .travis.yml | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96b53ce6c..77ddefdeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ node_js: before_script: - npm install vue vue-template-compiler script: - - cp ./scripts/.npmrc.template $HOME/.npmrc + - if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then cp ./scripts/.npmrc.template $HOME/.npmrc; fi - COVERAGE=true npm run test - npm run codecov - if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then npm run pub-with-ci; fi diff --git a/package.json b/package.json index e979fe485..3b6542c9c 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "es" ], "scripts": { - "dev": "NODE_ENV=development ENTRY_INDEX=dev ./node_modules/.bin/webpack-dev-server --open --hot --port 3001", - "start": "NODE_ENV=development ./node_modules/.bin/webpack-dev-server --open --hot", + "dev": "cross-env NODE_ENV=development ENTRY_INDEX=dev ./node_modules/.bin/webpack-dev-server --open --hot --port 3001", + "start": "cross-env NODE_ENV=development ./node_modules/.bin/webpack-dev-server --open --hot", "test": "jest --config .jest.js", "site": "node scripts/run.js site-dist", "copy": "node scripts/run.js copy-html",