Is package.json supposed to be manually edited? Couldn\'t a program like npm just look through the files, see the \"require\" statements, and then use that to put the necess
First off, run
npm init
...will ask you a few questions (read this first) about your project/package and then generate a package.json file for you.
Then, once you have a package.json file, use
npm install --save
or
npm install --save-dev
...to install a dependency and automatically append it to your package.json
's dependencies
list.
(Note: You may need to manually tweak the version ranges for your dependencies.)