Created
February 29, 2016 17:24
-
-
Save nicdoye/7549383d0f86a0a7c7af to your computer and use it in GitHub Desktop.
Install and find all the node modules
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
# Assuming you only require from index.js | |
# and you use const | |
# and you use const at the beginning of a line | |
# and there aren't other things like child_process to filter out | |
npm install $(egrep ^'const(.*)= require' index.js | egrep -v '/|child_process' | cut -f2 -d\' | xargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can bet Node has a better, built in way. Embarrass/educate me by putting a link in here.