Closed timoxley closed 12 years ago
Nice. Thanks for sharing. I just tried it out, but it butchered the formatting of my package.json
file, which it's too early to tell if I want to deal with that or not. However, I'm going to make a note of this in the readme. Thanks again.
I only edit my package.json manually if I'm adding things like scripts, most common things I want to do is automated these days. Originally I didn't like the way it formatted my file either but I concede that conforming to convention, and using npm automation is more beneficial than a mostly arbitrary json formatting preference.
Other handy commands that write to your package.json:
npm init
writes your initial package.json with author, github, test commands, etc.
npm install --save-dev module
…saves module as a dev-dependency
npm install --save-optional module
…saves module as a optional dependency
npm remove --save module
removes module and takes it out of your dependencies
npm install --save express@latest
will get the latest version of express and automatically updates yourpackage.json
dependencies with that version.