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 git pull origin master
scripts/install-sdk.sh 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 #### #### Starting Cloud9 ####

Wyświetl plik

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

Wyświetl plik

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