Skip to content

Instantly share code, notes, and snippets.

@ilaborie
Created August 26, 2017 08:44
Show Gist options
  • Save ilaborie/bc1c6cfdbcf65f2b7ceebc7b859a106c to your computer and use it in GitHub Desktop.
Save ilaborie/bc1c6cfdbcf65f2b7ceebc7b859a106c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# nvm
echo "=== Install NVM ==="
echo "see https://github.com/creationix/nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
rc=$?;
if [[ $rc != 0 ]]; then
echo "🚫 install NVM fail"
exit $rc;
fi
echo "✅ install NVM OK"
# NodeJS
echo "=== Install NodeJS ==="
echo "see https://nodejs.org/en/"
nvm install stable
rc=$?;
if [[ $rc != 0 ]]; then
echo "🚫 install NodeJS Fail"
exit $rc;
fi
echo "✅ install NodeJS OK"
# Yarn, @angular/cli
echo "=== Install dependencies ==="
echo "see https://yarnpkg.com/lang/en/docs/install/"
echo "see https://github.com/angular/angular-cli"
npm install --global yarn @angular/cli
rc=$?;
if [[ $rc != 0 ]]; then
echo "🚫 install dependencies Fail"
exit $rc;
fi
echo "✅ install dependencies OK"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment