Skip to content

Instantly share code, notes, and snippets.

@simbo
Last active July 13, 2022 14:24

Revisions

  1. simbo revised this gist Mar 3, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions provision-node.sh
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    # su vagrant -c "source ${PROVISION_DIR}/provision-node.sh"
    #
    # [!] please keep the echo messages. those actions could take some more time without any output, so let the user know.
    ##

    # install latest nvm
    git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
  2. simbo revised this gist Mar 3, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion provision-node.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,10 @@
    ##
    # add this to your provision.sh
    #
    # [!] run as 'vagrant' like this:
    # su vagrant -c "source ${PROVISION_DIR}/provision-node.sh"
    # (please keep the echo messages. those actions could take some more time without any output, so let the user know.)
    #
    # [!] please keep the echo messages. those actions could take some more time without any output, so let the user know.

    # install latest nvm
    git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
  3. simbo revised this gist Mar 3, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion provision-node.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    # add this to your provision.sh
    # [!] run as 'vagrant'
    # [!] run as 'vagrant' like this:
    # su vagrant -c "source ${PROVISION_DIR}/provision-node.sh"
    # (please keep the echo messages. those actions could take some more time without any output, so let the user know.)

    # install latest nvm
  4. simbo revised this gist Feb 26, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion provision-node.sh
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    # install latest nvm
    git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
    source ~/.nvm/nvm.sh
    echo "~/.nvm/nvm.sh" >> ~/.bashrc
    echo "source ~/.nvm/nvm.sh" >> ~/.bashrc

    # install latest stable node.js
    echo "Installing node.js... (please be patient)"
  5. simbo revised this gist Feb 18, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion provision-node.sh
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,26 @@
    # add this to your provision.sh
    # [!] run as 'vagrant'
    # (please keep the echo messages. those actions could take some more time without any output, so let the user know.)

    # install latest nvm
    git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
    source ~/.nvm/nvm.sh
    echo "~/.nvm/nvm.sh" >> ~/.bashrc

    # install latest stable node.js
    echo "Installing node.js..."
    echo "Installing node.js... (please be patient)"
    nvm install stable &> /dev/null
    nvm alias default stable

    # install global node packages
    echo "Installing global node.js packages... (please be patient)"
    # change 'gulp' to 'grunt' depending on project setup
    npm install -g gulp bower npm-check-updates

    # install project dependencies and build
    cd /vagrant/
    echo "Installing local node.js packages... (please be patient)"
    npm install
    bower install
    # see package.json for respective build task
    npm run build-dev
  6. simbo created this gist Feb 18, 2015.
    23 changes: 23 additions & 0 deletions provision-node.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # add this to your provision.sh
    # [!] run as 'vagrant'

    # install latest nvm
    git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
    source ~/.nvm/nvm.sh
    echo "~/.nvm/nvm.sh" >> ~/.bashrc

    # install latest stable node.js
    echo "Installing node.js..."
    nvm install stable &> /dev/null
    nvm alias default stable

    # install global node packages
    echo "Installing global node.js packages... (please be patient)"
    npm install -g gulp bower npm-check-updates

    # install project dependencies and build
    cd /vagrant/
    echo "Installing local node.js packages... (please be patient)"
    npm install
    bower install
    npm run build-dev