Skip to content

Commit 483c132

Browse files
committed
Typos
1 parent cd99a2e commit 483c132

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

materials/appendixA/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ <h2 id="howdoes">How does Webpack compare to build tools such as Grunt and Gulp?
120120

121121
<p>Build tools such as Grunt and Gulp work by looking into a defined path for files that match your configuration. In the configuration file you also specify the tasks and steps that should run to transform, combine and/or minify each of these files. <br /> <img src="images/picture1.png" width="800" /></p>
122122

123-
<p>Webpack, instead, analyzes your project as a whole. Given a starting main file, Webpack looks through all of your project's dependencies (by following require and import statements in JavaScript), process them using loaders and generate a bundled JavaScript file.<br /> <img src="images/picture2.png" width="656"/></p>
123+
<p>Webpack, instead, analyzes your project as a whole. Given a starting main file, Webpack looks through all of your project's dependencies (by following require and import statements in JavaScript), processes them using loaders and generates a bundled JavaScript file.<br /> <img src="images/picture2.png" width="656"/></p>
124124

125125
<p>Webpack's approach is faster and more straightforward. And, as you will see later in this chapter, opens lots of new possibilities for bundling different file types.</p>
126126

@@ -147,9 +147,9 @@ <h2 id="sampleproject">Sample project</h2>
147147

148148
<p><pre><code class="bash">npm install --save-dev webpack</code></pre></p>
149149

150-
<p>With the project set up and webpack installed, let's move on to the project structure, which will consist of two folders: an "app" folder for original source code / JavaScript modules, and a "public" folder for files that are ready to be used in the browser (which include the bundled JavaScript file generated by Webpack, as well as an index.html file). You will create three files: An index.html file on the public folder and two JavaScript files on the app folder: main.js and Greeter.js. At the end, the project structure will look like the image below:<br /><img src="images/picture3.png" width="175"/></p>
150+
<p>With the project set up and webpack installed, let's move on to the project structure, which will consist of two folders: an "app" folder for original source code / JavaScript modules, and a "public" folder for files that are ready to be used in the browser (which include the bundled JavaScript file generated by Webpack, as well as an index.html file). You will create three files: An index.html file on the public folder and two JavaScript files on the app folder: main.js and Greeter.js. In the end, the project structure will look like the image below:<br /><img src="images/picture3.png" width="175"/></p>
151151

152-
<p>The index.html will contain a pretty basic HTML page, whose only purpose is load the bundled JavaScript file:</p>
152+
<p>The index.html will contain a pretty basic HTML page, whose only purpose is to load the bundled JavaScript file:</p>
153153
<p><pre><code>
154154
&lt;!DOCTYPE html&gt;
155155
&lt;html lang=&quot;en&quot;&gt;
@@ -165,7 +165,7 @@ <h2 id="sampleproject">Sample project</h2>
165165
&lt;/html&gt;
166166
</code></pre></p>
167167

168-
<p>Next, you will head to the JavaScript files: main.js and Greeter.js. The Greeter.js is simply a function that returns a new HTML element with a greeting message. The main.js file will require the Greeter and insert the returned element on the page.</p>
168+
<p>Next, you will head to the JavaScript files: main.js and Greeter.js. The Greeter.js is simply a function that returns a new HTML element with a greeting message. The main.js file will insert the HTML element returned by the Greeter module in the page.</p>
169169

170170
<p class="code-caption">The main.js source code:</p>
171171
<p><pre><code>
@@ -184,7 +184,7 @@ <h2 id="sampleproject">Sample project</h2>
184184
</code></pre></p>
185185

186186
<div class="note">
187-
<p><strong>Note:</strong> Throughout the book, the recently standardized ES6 module definition was used. In it's current version, though, Webpack only supports the commonJS module definition out of the box (i.e. require). Using ES6 modules with webpack will be covered later in this appendix.</p>
187+
<p><strong>Note:</strong> Throughout the book, the recently standardized ES6 module definition was used. In its current version, though, Webpack only supports the commonJS module definition out of the box (i.e. require). Using ES6 modules with webpack will be covered later in this appendix.</p>
188188
</div>
189189

190190

@@ -261,7 +261,7 @@ <h2 id="generatingsource">Generating source maps</h2>
261261

262262
<p>There is a handful of options for configuring Webpack - Let's get started with one of most important and used ones: Source Maps.</p>
263263

264-
<p>While packing together all of your project's JavaScript modules into one (or a few) bundled file to use on the browser present a lot of advantages, one clear disadvantage is that you won't be able to reference back your original code in their original files when debugging in the browser - It becomes very challenging to locate exactly where the code you are trying to debug maps to your original authored code. However, Webpack can generate source maps when bundling - A source map provides a way of mapping code within a bundled file back to it's original source file, making the code readable and easier to debug in the browser.</p>
264+
<p>While packing together all of your project's JavaScript modules into one (or a few) bundled file to use on the browser presents a lot of advantages, one clear disadvantage is that you won't be able to reference back your original code in their original files when debugging in the browser - It becomes very challenging to locate exactly where the code you are trying to debug maps to your original authored code. However, Webpack can generate source maps when bundling - A source map provides a way of mapping code within a bundled file back to its original source file, making the code readable and easier to debug in the browser.</p>
265265

266266
<p>To configure Webpack to generate source maps that points to the original files, use the "devtool" setting with one of the following options:</p>
267267

@@ -289,7 +289,7 @@ <h2 id="generatingsource">Generating source maps</h2>
289289
<p><strong>cheap-module-source-map</strong></p>
290290
</td>
291291
<td>
292-
<p>Generate source map in a separate file without column-mappings. Stripping the column mapping favors a better build performance introducing a minor inconvenient for debugging: The browser developer tools will only be able to point to the line of the original source code, but not to a specific column (or character).</p>
292+
<p>Generate source map in a separate file without column-mappings. Stripping the column mapping favors a better build performance introducing a minor inconvenience for debugging: The browser developer tools will only be able to point to the line of the original source code, but not to a specific column (or character).</p>
293293
</td>
294294
</tr>
295295
<tr>
@@ -336,7 +336,7 @@ <h2 id="generatingsource">Generating source maps</h2>
336336

337337
<h1 id="webpackdevelopment">Webpack Development Server</h1>
338338

339-
<p>Webpack has an optional server for local development purposes. It is a smallnode.js expressapp that serves static files and build your assets according to your webpack configuration, keeping them in memory, and doing so automatically refreshing the browser as you change your source files. It's a separate npm module that should be installed as a project dependency:</p>
339+
<p>Webpack has an optional server for local development purposes. It is a smallnode.js expressapp that serves static files and builds your assets according to your webpack configuration, keeping them in memory, and doing so automatically refreshing the browser as you change your source files. It's a separate npm module that should be installed as a project dependency:</p>
340340

341341
<p><pre><code class="bash">npm install --save-dev webpack-dev-server</code></pre></p>
342342

0 commit comments

Comments
 (0)