package.jason code example
Example 1: change name in package json from command line
cd some/node/project
npe name
npe scripts
npe scripts.test
npe repository.url
open $(npe repository.url)
npe name foo
npe scripts.start "node index.js"
npe keywords "foo, bar, cheese whiz"
npe keywords "foo bar baz"
npe name --package=some/other/package.json
npe name other --package=some/other/package.json
Example 2: what is package.json in node
All npm packages contain a file, usually in the project root, called package. json - this file holds various metadata relevant to the project. This file is used to give information to npm that allows it to identify the project as well as handle the project's dependencies.