From 2c75064a26542dca4e5f8b31ff1743b47a89c436 Mon Sep 17 00:00:00 2001 From: Ryan Palo Date: Mon, 26 Feb 2018 06:17:32 -0800 Subject: [PATCH 1/8] docs(Guides): Fix error in Getting Started Fixes error in Getting Started Guide --- src/content/guides/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/guides/getting-started.md b/src/content/guides/getting-started.md index 669e336cf604..955b55123d98 100644 --- a/src/content/guides/getting-started.md +++ b/src/content/guides/getting-started.md @@ -144,7 +144,7 @@ In this setup, `index.js` explicitly requires `lodash` to be present, and binds With that said, let's run `npx webpack` with our script as the [entry point](/concepts/entry-points) and `bundle.js` as the [output](/concepts/output). The `npx` command, which ships with Node 8.2 or higher, runs the webpack binary (`./node_modules/.bin/webpack`) of the webpack package we installed in the beginning: ``` bash -npx webpack src/index.js dist/bundle.js +npx webpack src/index.js --output dist/bundle.js Hash: 857f878815ce63ad5b4f Version: webpack 3.9.1 From 650f69efa3240018272270932f3d734009d05307 Mon Sep 17 00:00:00 2001 From: Reinier Kaper Date: Mon, 26 Feb 2018 22:53:39 -0500 Subject: [PATCH 2/8] Updated getting-started.md * Changes the guide so it reflects webpack 4 output. * Changes some wordings here and there and adds some clarifications. * Adds `webpack-cli` install which is required with v4 --- src/content/guides/getting-started.md | 96 ++++++++++++++++++--------- 1 file changed, 64 insertions(+), 32 deletions(-) diff --git a/src/content/guides/getting-started.md b/src/content/guides/getting-started.md index 955b55123d98..7722f8bd5f34 100644 --- a/src/content/guides/getting-started.md +++ b/src/content/guides/getting-started.md @@ -20,15 +20,18 @@ Webpack is used to compile JavaScript modules. Once [installed](/guides/installa ## Basic Setup -First let's create a directory, initialize npm, and [install webpack locally](/guides/installation#local-installation): +First let's create a directory, initialize npm, [install webpack locally](/guides/installation#local-installation), and install the webpack-cli (which we'll need to run webpack from the command line (CLI)): ``` bash mkdir webpack-demo && cd webpack-demo npm init -y npm install --save-dev webpack +npm install --save-dev webpack-cli ``` -Now we'll create the following directory structure and contents: +T> Throughout the Guides we will use `diff` blocks to show you what changes we're making to directories, files, code, etc. For example: below we're adding `index.html` (file), `/src` (directory), and `index.js` (file). + +Now we'll create the following directory structure, files and their contents: __project__ @@ -69,7 +72,7 @@ __index.html__ ``` -In this example, there are implicit dependencies between the `