Skip to content

Instantly share code, notes, and snippets.

@munshkr
Last active March 20, 2020 21:19
Show Gist options
  • Save munshkr/54df21439b13549d6de06d20b8d8dfc3 to your computer and use it in GitHub Desktop.
Save munshkr/54df21439b13549d6de06d20b8d8dfc3 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu -o pipefail
text="
# Add global npm packages to PATH
export PATH=\$HOME/.npm-global/bin:\$PATH"
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo $text >> $HOME/.profile
source ~/.profile
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment