Skip to content

Instantly share code, notes, and snippets.

@2ajoyce
Last active August 3, 2017 13:26
Show Gist options
  • Save 2ajoyce/47293e01c7147d4e3d9aadb281d2c08b to your computer and use it in GitHub Desktop.
Save 2ajoyce/47293e01c7147d4e3d9aadb281d2c08b to your computer and use it in GitHub Desktop.
Angular 2 Setup script for Cloud9
#!/bin/bash
# Usage instructions
# `git clone scripts/setup` To clone the repo
# `chmod +x scripts/setup/setup.sh` To mark the file executable
# `. scripts/setup/setup.sh` To run the file
# Shorthand Version
# `git clone scripts/setup && chmod +x scripts/setup/setup.sh && . scripts/setup/setup.sh`
echo IMPORTING DEPENDANCIES
. ~/.nvm/nvm.sh
. ~/.profile
. ~/.bashrc
function setup {
echo APT-GET UPDATE
sudo apt-get update
echo APT-GET INSTALL INSTALL BUILD-ESSENTIAL, CHECKINSTALL, LIBSSL-DEV
sudo apt-get install build-essential checkinstall libssl-dev
echo INSTALLING NPM
npm install -g npm
echo INSTALLING NODE 6.11.0
nvm install 6.11.0
nvm use 6.11.0
nvm alias default 6.11.0
echo INSTALLING ANGULAR-CLI
npm install -g @angular/cli@latest typescript@latest --save
}
echo STARTING SETUP FUNCTION
setup # Run setup once
# Clone serve script into project
echo CLONING SERVE SCRIPT GIT REPO
git clone https://gist.github.com/318b359d8b32c7d57bea70b1ea738eb8.git scripts/serve
chmod +x scripts/serve/serve.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment