Clarify where package.json is created and how start and build are added
This commit is contained in:
@@ -15,7 +15,7 @@ Create a new empty directory for your project and navigate to it by running `mkd
|
|||||||
|
|
||||||
npm init
|
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
|
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
|
## 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
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user