6. 5
$ npm init
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sane defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (hello)
version: (0.0.0)
description: Hello World
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /Users/masu/Dropbox/node/hello/package.json:
{
"name": "hello",
"version": "0.0.0",
"description": "Hello World",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this ok? (yes)
$
プロジェクトの初期設定を
対話式に行うコマンド
「package.json」を生成す
るだけ
「package.json」は後から
自分で作成してもいい
「package.json」はなくも
node.js は使える