Skip to content

Commit 242d500

Browse files
author
Pavithra K
committed
Nitpicks :P
1 parent 4962590 commit 242d500

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

content/get-started/index.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ sort: 3
77

88
## Getting Started
99

10-
webpack is a tool to build javascript modules in your application. To start using `webpack` from its [cli](/api/cli) or [api](/api/node), follow the [Installation instructions](/get-started/install-webpack).
11-
webpack simplifies your workflow by quickly constructing a dependency graph of your application and bundling them in the right order. webpack can be configured to customise optimisations to your code, to split vendor/css/js code for production, have a hot reloaded dev server and many such cool features. Learn more about [why you should use webpack](/get-started/why-webpack).
10+
webpack is a tool to build JavaScript modules in your application. To start using `webpack` from its [cli](/api/cli) or [api](/api/node), follow the [Installation instructions](/get-started/install-webpack).
11+
webpack simplifies your workflow by quickly constructing a dependency graph of your application and bundling them in the right order. webpack can be configured to customise optimisations to your code, to split vendor/css/js code for production, run a development server that hot-reloads your code without page refresh and many such cool features. Learn more about [why you should use webpack](/get-started/why-webpack).
1212

1313
## Creating a bundle
1414

@@ -18,7 +18,7 @@ Create a demo directory to try out webpack. [Install webpack](/get-started/insta
1818
mkdir webpack-demo && cd webpack-demo
1919
npm init -y
2020
npm install --save-dev webpack
21-
webpack --help //Shows a list of valid cli commands
21+
webpack --help # Shows a list of valid cli commands
2222
npm install --save lodash
2323
```
2424

@@ -30,13 +30,13 @@ __app/index.js__
3030
function component () {
3131
var element = document.createElement('div');
3232

33-
/* dependency on lodash in the next line */
33+
/* lodash is required for the next line to work */
3434
element.innerHTML = _.map(['Hello','webpack'], function(item){
3535
return item + ' ';
3636
});
3737

3838
return element;
39-
};
39+
}
4040

4141
document.body.appendChild(component());
4242
```
@@ -48,9 +48,9 @@ __index.html__
4848
```html
4949
<html>
5050
<head>
51-
<title>Webpack demo</title>
52-
<script src='https://unpkg.com/[email protected]' type='text/javascript'></script>
53-
<script src='index.js' type='text/javascript'></script>
51+
<title>Webpack demo</title>
52+
<script src='https://unpkg.com/[email protected]' type='text/javascript'></script>
53+
<script src='index.js' type='text/javascript'></script>
5454
</head>
5555
<body>
5656
</body>
@@ -81,10 +81,10 @@ Also we will need to change the `index.html` to expect a single bundled js file.
8181
```diff
8282
<html>
8383
<head>
84-
<title>Webpack demo</title>
85-
- <script src='https://unpkg.com/[email protected]' type='text/javascript'></script>
86-
- <script src='index.js' type='text/javascript'></script>
87-
+ <script src='dist/bundle.js' type='text/javascript'></script>
84+
<title>Webpack demo</title>
85+
- <script src='https://unpkg.com/[email protected]' type='text/javascript'></script>
86+
- <script src='index.js' type='text/javascript'></script>
87+
+ <script src='dist/bundle.js' type='text/javascript'></script>
8888
</head>
8989
<body>
9090
<div id='root'></div>
@@ -117,12 +117,12 @@ The above CLI command would be represented in config as follows -
117117

118118
__webpack.config.js__
119119
```javascript
120-
{
121-
entry: './app/index.js'
122-
output: {
123-
filename: 'bundle.js',
124-
path: './dist'
125-
}
120+
module.exports = {
121+
entry: './app/index.js'
122+
output: {
123+
filename: 'bundle.js',
124+
path: './dist'
125+
}
126126
}
127127
```
128128

@@ -141,7 +141,7 @@ index.js 1.56 kB 0 [emitted] main
141141
```
142142
T> If a `webpack.config.js` is present, `webpack` command picks it up by default.
143143

144-
The config file allows for all the flexibility in using webpack. We can add loaders, plugins, resolve options and many other enhancements to our bundles using this configuration file.
144+
The config file allows for all the flexibility in using webpack. We can add loader rules, plugins, resolve options and many other enhancements to our bundles using this configuration file.
145145

146146
## Using webpack with npm
147147

0 commit comments

Comments
 (0)