Skip to content

Commit fd84b2f

Browse files
authored
Merge pull request #554 from GRardB/develop
Fix grammar issues and make require.context explanation more clear
2 parents baae7c8 + 63d8c63 commit fd84b2f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

content/api/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ These options makes the build watch for changes in files of the dependency graph
169169

170170
### Optimize Options
171171

172-
These options allow to manipulate optimisations for a production build using webpack
172+
These options allow you to manipulate optimisations for a production build using webpack
173173

174174
| Parameter | Explanation | Plugin used |
175175
|---------------------------|--------------------------------------------------------|--------------------------------------|
@@ -180,7 +180,7 @@ These options allow to manipulate optimisations for a production build using web
180180

181181
### Resolve Options
182182

183-
These allow to configure the webpack resolver with aliases and extensions.
183+
These allow you to configure the webpack resolver with aliases and extensions.
184184

185185
| Parameter | Explanation | Example |
186186
|------------------------|---------------------------------------------------------|---------------------------------------------|

content/guides/dependency-management.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Example:
2020
require("./template/" + name + ".ejs");
2121
```
2222

23-
Webpack parses the require statement and extracts some information:
23+
Webpack parses the `require()` call and extracts some information:
2424

2525
```
2626
Directory: ./template
@@ -45,8 +45,9 @@ This means dynamic requires are supported but will cause all possible modules to
4545

4646
## `require.context`
4747

48-
You can create your own context with the require.context function.
49-
It allow to pass a directory, regular expression and a flag if subdirectories should be searched too.
48+
You can create your own context with the `require.context()` function.
49+
It allows you to pass in a directory to search, a flag indicating whether subdirectories should be searched
50+
too, and a regular expression to match files against.
5051

5152
Webpack parses for `require.context()` in the code while building.
5253

@@ -84,7 +85,7 @@ function importAll (r) {
8485
}
8586
importAll(require.context('../components/', true, /\.js$/));
8687
```
87-
88+
8889
```javascript
8990
var cache = {};
9091
function importAll (r) {

0 commit comments

Comments
 (0)