run npm install on scripts/code

#22
This commit is contained in:
Joao Moreno
2015-11-26 09:29:43 +01:00
parent b845a937e6
commit 4a85ac575c
2 changed files with 32 additions and 14 deletions

View File

@@ -7,17 +7,27 @@ else
ROOT=$(dirname $(dirname $(readlink -f $0)))
fi
# Configuration
export NODE_ENV=development
export VSCODE_DEV=1
export ELECTRON_ENABLE_LOGGING=1
export ELECTRON_ENABLE_STACK_DUMPING=1
function code() {
cd $ROOT
# Prepare
cd $ROOT ; node node_modules/gulp/bin/gulp.js electron
# Node modules
test -d node_modules || ./scripts/npm.sh install
if [[ "$OSTYPE" == "darwin"* ]]; then
cd $ROOT; ./.build/electron/Electron.app/Contents/MacOS/Electron . $*
else
cd $ROOT; ./.build/electron/electron . $*
fi
# Get electron
node node_modules/gulp/bin/gulp.js electron
# Configuration
export NODE_ENV=development
export VSCODE_DEV=1
export ELECTRON_ENABLE_LOGGING=1
export ELECTRON_ENABLE_STACK_DUMPING=1
# Launch Code
if [[ "$OSTYPE" == "darwin"* ]]; then
./.build/electron/Electron.app/Contents/MacOS/Electron . $*
else
./.build/electron/electron . $*
fi
}
code