Skip to content

Instantly share code, notes, and snippets.

@gregfu
Created November 10, 2013 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregfu/7393204 to your computer and use it in GitHub Desktop.
Save gregfu/7393204 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if [[ ! -d "${HOME}/.nvm" ]]; then
git clone https://github.com/creationix/nvm.git "${HOME}/.nvm"
fi
NODE_VERSION="v0.10.21"
source "${HOME}/.nvm/nvm.sh"
nvm install $NODE_VERSION
nvm alias default $NODE_VERSION
npm install -g bower grunt-cli
cat - <<EOT
################################################################################
Bower and Grunt-cli have been installed globally via npm:
https://npmjs.org/
http://bower.io/
http://gruntjs.com/
Add the following to your shell startup scripts:
if [[ -s "\${HOME}/.nvm/nvm.sh" ]]; then
source "\${HOME}/.nvm/nvm.sh"
fi
if [[ -s "\${HOME}/.nvm/bash_completion" ]]; then
source "\${HOME}/.nvm/bash_completion"
fi
export PATH=./node_modules/.bin:$PATH
################################################################################
EOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment