Created
May 28, 2018 19:44
-
-
Save mafintosh/1d867728cba756a01689af5e4474943f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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