Clarify where package.json is created and how start and build are added

This commit is contained in:
Andreas Hocevar
2019-01-14 18:00:22 +01:00
committed by GitHub
parent af74a476dc
commit 62288139d6

View File

@@ -15,7 +15,7 @@ Create a new empty directory for your project and navigate to it by running `mkd
npm init
Add OpenLayers as dependency to your application with
This will create a `package.json` file in your working directory. Add OpenLayers as dependency to your application with
npm install ol
@@ -71,7 +71,7 @@ You will also need an `index.html` file that will use your bundle. Here is a sim
## Creating a bundle
With simple scripts you can introduce the commands `npm run build` and `npm start` to manually build your bundle and watch for changes, respectively. Add the following to the script section in `package.json`:
With two additional lines in `package.json` you can introduce the commands `npm run build` and `npm start` to manually build your bundle and watch for changes, respectively. The final `package.json` with the two additional commands `"start"` and `"build"` should look like this:
```json
{