Skip to content

Commit 1c53ed5

Browse files
authored
Merge pull request #680 from ErikSchierboom/patch-1
Some grammar and consistency improvements
2 parents 0a347b3 + 6042989 commit 1c53ed5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

content/get-started/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ npm install --save-dev webpack@beta
2424
npm install --save lodash
2525
```
2626

27-
Now create subdirectory `app` with an `index.js` file.
27+
Now create a subdirectory `app` with an `index.js` file.
2828

2929
__app/index.js__
3030

@@ -41,7 +41,7 @@ function component () {
4141
document.body.appendChild(component());
4242
```
4343

44-
To run this piece of code, one usually has the below html
44+
To run this piece of code, one usually has the below HTML
4545

4646
__index.html__
4747

@@ -57,15 +57,15 @@ __index.html__
5757
</html>
5858
```
5959

60-
In this example, there are implicit dependencies between the script tags.
60+
In this example, there are implicit dependencies between the `<script>` tags.
6161

6262
`index.js` depends on `lodash` being included in the page before it runs. It is implicit because `index.js` never declared a need for `lodash`; it just assumes that a global variable `_` exists.
6363

6464
There are problems with managing JavaScript projects this way:
6565
- If a dependency is missing, or is included in the wrong order, the application will not function at all.
6666
- If a dependency is included but is not used, then there is a lot of unnecessary code that the browser has to download.
6767

68-
To bundle the `lodash` dependency with the `index.js`, we need to import `lodash`.
68+
To bundle the `lodash` dependency with `index.js`, we need to import `lodash` from `index.js`.
6969

7070
__app/index.js__
7171

@@ -76,7 +76,7 @@ function component () {
7676
...
7777
```
7878

79-
Also we will need to change the `index.html` to expect a single bundled js file.
79+
We also need to change `index.html` to expect a single bundled js file.
8080

8181
```diff
8282
<html>
@@ -95,7 +95,7 @@ Here, `index.js` explicitly requires `lodash` to be present, and binds it as `_`
9595

9696
By stating what dependencies a module needs, webpack can use this information to build a dependency graph. It then uses the graph to generate an optimized bundle where scripts will be executed in the correct order. Also unused dependencies will not be included in the bundle.
9797

98-
Now run `webpack` on this folder with the entry file to be `index.js` and to output a `bundle.js` file which bundles all the code required for the page.
98+
Now run `webpack` on this folder with `index.js` as the entry file and `bundle.js` as the output file in which all code required for the page is bundled.
9999

100100
```bash
101101
webpack app/index.js dist/bundle.js
@@ -116,8 +116,8 @@ You should see a page with the following text: 'Hello webpack'.
116116

117117
## Using webpack with a config
118118

119-
For more complex configuration, we can use a configuration file that webpack can reference to bundle your code. After you create a `webpack.config.js` file, represent the CLI command above
120-
with the following config settings -
119+
For a more complex configuration, we can use a configuration file that webpack can reference to bundle your code. After you create a `webpack.config.js` file, you can represent the CLI command above
120+
with the following config settings.
121121

122122
__webpack.config.js__
123123
```javascript
@@ -130,7 +130,7 @@ module.exports = {
130130
}
131131
```
132132

133-
This file can be run by webpack as
133+
This file can be run by webpack as follows.
134134

135135
```bash
136136
webpack --config webpack.config.js
@@ -170,5 +170,5 @@ T> You can pass custom parameters to webpack by adding two dashes to the `npm ru
170170

171171
## Conclusion
172172

173-
Now that you have a basic build together, you should dig into the [basic concepts](/concepts) and [configuration](/configuration) of webpack to better understand its design. Also check out the [guides](/guides) to learn how to approach common problems. The [API](/api) section digs into lower level.
173+
Now that you have a basic build together, you should dig into the [basic concepts](/concepts) and [configuration](/configuration) of webpack to better understand its design. Also check out the [guides](/guides) to learn how to approach common problems. The [API](/api) section digs into the lower level features.
174174

0 commit comments

Comments
 (0)