Skip to content

Instantly share code, notes, and snippets.

@suprememoocow
Last active August 29, 2015 13:56
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 suprememoocow/9275638 to your computer and use it in GitHub Desktop.
Save suprememoocow/9275638 to your computer and use it in GitHub Desktop.
Upgrade npm to 1.4.4 with Salt
# git is needed for npm if you have git references
build-essential:
pkg:
- installed
npm-custom:
git.latest:
- name: https://github.com/isaacs/npm.git
- target: /opt/npm
- rev: v1.4.4
remove-npm-ca:
cmd.wait:
- name: "echo 'ca=null' >> ~/.npmrc"
- watch:
- git: npm-custom
- pkg: build-essential
npm-install:
cmd.wait:
- name: make clean install
- cwd: /opt/npm/
- watch:
- cmd: remove-npm-ca
npm-post-install:
cmd.wait:
- name: npm config delete ca
- cwd: /opt/npm/
- watch:
- cmd: npm-install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment