Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// by @noffle
autoinstall () {
local MODULES=$(cat $1 | grep "require('.*')" | sed "s/.*require('\(.*\)')/\1/" | grep -v '^\.' | tr '\n' ' ')
shift
shift
npm install $MODULES $@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment