From 4de59e5b3312f511b3ae3a744418d7445662c069 Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Wed, 13 Jun 2018 11:23:22 +0200 Subject: [PATCH] Use parcel instead of webpack for quickstart. (#2182) much simpler --- docs/installation.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 5689bc257..5dd6434b2 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -23,17 +23,17 @@ $ npm install mithril --save --- -### Quick start with Webpack +### Quick start with [Parcel](https://parceljs.org/) 1. Initialize the directory as an npm package ```bash $ npm init --yes ``` -2. install required tools +2. Install the required tools. ```bash $ npm install mithril --save -$ npm install webpack webpack-cli --save-dev +$ npm install parcel-bundler --save-dev ``` 3. Add a "start" entry to the scripts section in `package.json`. @@ -41,7 +41,7 @@ $ npm install webpack webpack-cli --save-dev { // ... "scripts": { - "start": "webpack src/index.js --output bin/app.js -d --watch" + "start": "parcel src/index.html" } } ``` @@ -52,20 +52,20 @@ import m from "mithril"; m.render(document.body, "hello world"); ``` -5. create `index.html` +5. Create `index.html`. ```html - + ``` -6. run bundler +6. Run the bundler. ```bash $ npm start ``` -7. open `index.html` in a browser +7. Click the shown link to open it in the browser. #### Step by step