diff --git a/content/docs/guides/webpack/contents.lr b/content/docs/guides/webpack/contents.lr index fe5d62ba..04815825 100644 --- a/content/docs/guides/webpack/contents.lr +++ b/content/docs/guides/webpack/contents.lr @@ -34,18 +34,29 @@ Now you need to configure webpack. The plugin expects a webpack project in the ### `package.json` -This file instructs `npm` which packages we will need. All we need for a -start is to create an almost empty file: +This file instructs `npm` which packages we will need. -Recent versions of `npm` require `name` and `version` fields in your -`package.json` (see [npm package.json docs -:ext](https://docs.npmjs.com/files/package.json)). +[npm-init :ext](https://docs.npmjs.com/cli/init) is a command-line tool to +interactively create a ``package.json`` file. + +``` +$ npm init +``` + +This will ask you a bunch of questions (invoke with ``--yes`` to use default +values) and then generate the file for you: ```json { - "name": "foobar", + "name": "lektor-example", "version": "0.1.0", - "private": true + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT" } ```