Added package installation scripts

This commit is contained in:
jpellizzari
2017-01-19 14:13:03 -08:00
parent bfefa0902b
commit d5d853ebba
2 changed files with 8 additions and 1 deletions

View File

@@ -92,7 +92,7 @@
"build": "webpack --config webpack.production.config.js",
"build-external": "EXTERNAL=true webpack --config webpack.production.config.js",
"build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist",
"install": "npm run build-pkg",
"install": "./post-install.sh",
"start": "node server.js",
"start-production": "NODE_ENV=production node server.js",
"test": "jest",

7
client/post-install.sh Executable file
View File

@@ -0,0 +1,7 @@
pwd=$(pwd)
if [[ $pwd == *"node_modules"* ]]; then
echo "Installed as Node module. Building package..."
npm run build-pkg
else
echo "Installed as stand-alone UI. Skipped building package"
fi