Restoring node-modules and bower_components based on script contents

Ian Chu Te picture Ian Chu Te · Feb 24, 2015 · Viewed 19.3k times · Source

How do I restore node-modules and bower_components?

I want to source control files which are actually part of my application and not the dependencies. I want to restore those dependencies after I clone a fresh copy of my project. Something like the inverse of bower wiredep

Answer

whitfin picture whitfin · Feb 24, 2015

You can just set up a package.json for npm to install your node_modules using npm install. I believe bower also has something similar with bower.json.

I think both npm init and bower init should get you started.

Edit: yeah, Bower has it too