Skip to content

Instantly share code, notes, and snippets.

@dokipen
Created February 10, 2011 18:23
Show Gist options
  • Select an option

  • Save dokipen/821034 to your computer and use it in GitHub Desktop.

Select an option

Save dokipen/821034 to your computer and use it in GitHub Desktop.
for i in bin man lib; do
mkdir -p ~/.npm/${i}
done
cat <<END > ~/.npmrc
binroot = ~/.npm/bin
manroot = ~/.npm/man
root = ~/.npm/lib
END
curl http://npmjs.org/install.sh | sh
echo 'export PATH="${PATH}:~/.npm/bin"' >> ~/.bashrc
echo 'export NODE_PATH="${HOME}/.npm/lib"' >> ~/.bashrc
. .bashrc
npm ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment