fix sdk sync script

pull/468/merge
nightwing 2018-01-04 13:22:50 +00:00
rodzic fa81a92274
commit 0f337beaf5
3 zmienionych plików z 12 dodań i 16 usunięć

Wyświetl plik

@ -39,7 +39,8 @@ To update the SDK to the latest version run:
git pull origin master
scripts/install-sdk.sh
Please note that Cloud9 v3 is currently developed with Node.js 0.12 and 0.10. Newer versions of node should work too.
Please note that if you are using npm version >=3 and run npm install manually, you need to run `git checkout HEAD -- node_modules` to restore the files deleted by npm.
Cloud9 is known to work with node versions 0.10 to 8, but Newer versions should work too.
#### Starting Cloud9 ####

Wyświetl plik

@ -48,12 +48,5 @@
"start": "node server.js"
},
"devDependencies": {},
"licenses": [],
"bundledDependencies": [
"amd-loader",
"architect",
"architect-build",
"msgpack-js",
"c9"
]
"licenses": []
}

Wyświetl plik

@ -50,13 +50,15 @@ resetColor=$'\e[0m'
updateNodeModules() {
echo "${magenta}--- Running npm install --------------------------------------------${resetColor}"
safeInstall(){
deps=$("$NODE" -e 'console.log(Object.keys(require("./package.json").dependencies).join(" "))');
for m in ${deps[@]}; do echo "$m";
"$NPM" install --loglevel warn "$m"
done
}
"$NPM" install || safeInstall
"$NPM" install --production
for i in $(git show HEAD:node_modules/); do
if [ "$i" != tree ] && [ "$i" != "HEAD:node_modules/" ]; then
[ -d node_modules/$i ] || git checkout HEAD -- node_modules/$i;
fi
done
rm -f package-lock.json
echo "${magenta}--------------------------------------------------------------------${resetColor}"
}