From d301a7a5fa3281b778f471a4afb1710146a8bf2f Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Thu, 12 Nov 2015 10:00:40 -0600 Subject: [PATCH] using cross-env for env var compatibility --- docs/package.json | 12 ++---------- package.json | 28 ++++------------------------ 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/docs/package.json b/docs/package.json index 5ace697e..13a3fc84 100644 --- a/docs/package.json +++ b/docs/package.json @@ -5,18 +5,9 @@ "author": "React Toolbox Team (http://github.com/react-toolbox)", "scripts": { "start": "node ./server", - "build": "better-npm-run build", + "build": "cross-env NODE_ENV=production UV_THREADPOOL_SIZE=100 webpack --config ./webpack.config.production --colors --profile --progress", "deploy": "gh-pages -d build" }, - "betterScripts": { - "build": { - "command": "webpack --config ./webpack.config.production --colors --profile --progress", - "env": { - "NODE_ENV": "production", - "UV_THREADPOOL_SIZE": 100 - } - } - }, "dependencies": { "codemirror": "^5.8.0", "history": "^1.12.6", @@ -32,6 +23,7 @@ "babel-loader": "^5.3.2", "babel-plugin-react-transform": "^1.1.1", "better-npm-run": "0.0.3", + "cross-env": "^1.0.4", "css-loader": "^0.21.0", "express": "^4.13.3", "extract-text-webpack-plugin": "^0.8.2", diff --git a/package.json b/package.json index 735d2c44..2a7fd1c5 100644 --- a/package.json +++ b/package.json @@ -21,32 +21,12 @@ "lint": "eslint ./ --ext .js,.jsx", "babel": "babel ./components --out-dir ./lib", "sass": "cpx './components/**/*.scss' ./lib", - "build": "better-npm-run build", + "build": "cross-env NODE_ENV=production npm run babel && npm run sass", "clean": "rimraf ./lib", "prebuild": "npm run clean", "prepublish": "npm run build", - "test": "better-npm-run test", - "test:watch": "better-npm-run test:watch" - }, - "betterScripts":{ - "build": { - "command": "npm run babel && npm run sass", - "env": { - "NODE_ENV": "production" - } - }, - "test": { - "command": "karma start", - "env": { - "NODE_ENV": "test" - } - }, - "test:watch":{ - "command": "karma start --no-single-run", - "env": { - "NODE_ENV": "test" - } - } + "test": "cross-env NODE_ENV=test karma start", + "test:watch": "cross-env NODE_ENV=test karma start --no-single-run" }, "bugs": { "url": "https://github.com/react-toolbox/react-toolbox/issues", @@ -74,7 +54,7 @@ "babel-loader": "^5.3.2", "babel-plugin-react-transform": "^1.1.1", "core-js": "^1.2.6", - "better-npm-run": "^0.0.3", + "cross-env": "^1.0.4", "cpx": "^1.2.1", "css-loader": "^0.21.0", "eslint": "^1.7.3",