< ページ移動: 1 2 >
$ pwd/Users/shinoda$ mkdir electron_proj$ mkdir electron_proj/testapp1$ cd electron_proj/testapp1$ npm initThis utility will walk you through creating a package.json file.It only covers the most common items, and tries to guess sensible defaults.See `npm help json` for definitive documentation on these fieldsand exactly what they do.Use `npm install <pkg>` afterwards to install a package andsave it as a dependency in the package.json file.Press ^C at any time to quit.package name: (testapp1)version: (1.0.0)description: Test Program YO!!entry point: (index.js)test command:git repository:keywords: sample testauthor: shinodalicense: (ISC)About to write to /Users/shinoda/electron_proj/testapp1/package.json:{"name": "testapp1","version": "1.0.0","description": "Test Program YO!!","main": "index.js","scripts": {"test": "echo \"Error: no test specified\" && exit 1"},"keywords": ["sample","test"],"author": "shinoda","license": "ISC"}Is this OK? (yes) <リターンキー>
$ ls -latotal 8drwxr-xr-x 3 shinoda staff 96 12 28 13:01 .drwxr-xr-x 3 shinoda staff 96 12 28 11:55 ..-rw-r--r-- 1 shinoda staff 274 12 28 13:01 package.json$ cat package.json{"name": "testapp1","version": "1.0.0","description": "Test Program YO!!","main": "index.js","scripts": {"test": "echo \"Error: no test specified\" && exit 1"},"keywords": ["sample","test"],"author": "shinoda","license": "ISC"}