Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
npm init #131
Give the user a few prompts, and then write a package.json file. If there is a package.json file, then that file provides the defaults for each option rather than the defaults suggested below.
Have some way for the user to type HELP or something at any point to show some helpful text on that field.
At the end, write the package.json with JSON.stringify(data, null, 2) so that it's somewhat readable. (Sadly, no easy way to write comma-first JSON, unless we include my textmate pretty-printer with npm, which seems silly.)