Skip to content

Commit 08d434e

Browse files
author
Rouzbeh Sarrafieh
committed
lower casing all Capital Case Webpack instances part trois
1 parent a7a3295 commit 08d434e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

content/development/how-to-write-a-plugin.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ title: How to write a plugin?
33
sort: 2
44
---
55

6-
Plugins expose the full potential of the Webpack engine to third-party developers. Using staged build callbacks, developers can introduce their own behaviors into the Webpack build process. Building plugins is a bit more advanced than building loaders, because you'll need to understand some of the Webpack low-level internals to hook into them. Be prepared to read some source code!
6+
Plugins expose the full potential of the webpack engine to third-party developers. Using staged build callbacks, developers can introduce their own behaviors into the webpack build process. Building plugins is a bit more advanced than building loaders, because you'll need to understand some of the webpack low-level internals to hook into them. Be prepared to read some source code!
77

88
## Compiler and Compilation
99

10-
Among the two most important resources while developing plugins are the `compiler` and `compilation` objects. Understanding their roles is an important first step in extending the Webpack engine.
10+
Among the two most important resources while developing plugins are the `compiler` and `compilation` objects. Understanding their roles is an important first step in extending the webpack engine.
1111

12-
- The `compiler` object represents the fully configured Webpack environment. This object is built once upon starting Webpack, and is configured with all operational settings including options, loaders, and plugins. When applying a plugin to the Webpack environment, the plugin will receive a reference to this compiler. Use the compiler to access the main Webpack environment.
12+
- The `compiler` object represents the fully configured webpack environment. This object is built once upon starting webpack, and is configured with all operational settings including options, loaders, and plugins. When applying a plugin to the webpack environment, the plugin will receive a reference to this compiler. Use the compiler to access the main webpack environment.
1313

14-
- A `compilation` object represents a single build of versioned assets. While running Webpack development middleware, a new compilation will be created each time a file change is detected, thus generating a new set of compiled assets. A compilation surfaces information about the present state of module resources, compiled assets, changed files, and watched dependencies. The compilation also provides many callback points at which a plugin may choose to perform custom actions.
14+
- A `compilation` object represents a single build of versioned assets. While running webpack development middleware, a new compilation will be created each time a file change is detected, thus generating a new set of compiled assets. A compilation surfaces information about the present state of module resources, compiled assets, changed files, and watched dependencies. The compilation also provides many callback points at which a plugin may choose to perform custom actions.
1515

16-
These two components are an integral part of any Webpack plugin (especially a `compilation`), so developers will benefit by familiarizing themselves with these source files:
16+
These two components are an integral part of any webpack plugin (especially a `compilation`), so developers will benefit by familiarizing themselves with these source files:
1717

1818
- [Compiler Source](https://github.com/webpack/webpack/blob/master/lib/Compiler.js)
1919
- [Compilation Source](https://github.com/webpack/webpack/blob/master/lib/Compilation.js)
2020

2121
## Basic plugin architecture
2222

23-
Plugins are instanceable objects with an `apply` method on their prototype. This `apply` method is called once by the Webpack compiler while installing the plugin. The `apply` method is given a reference to the underlying Webpack compiler, which grants access to compiler callbacks. A simple plugin is structured as follows:
23+
Plugins are instanceable objects with an `apply` method on their prototype. This `apply` method is called once by the webpack compiler while installing the plugin. The `apply` method is given a reference to the underlying webpack compiler, which grants access to compiler callbacks. A simple plugin is structured as follows:
2424

2525
```javascript
2626
function HelloWorldPlugin(options) {
@@ -36,7 +36,7 @@ HelloWorldPlugin.prototype.apply = function(compiler) {
3636
module.exports = HelloWorldPlugin;
3737
```
3838

39-
Then to install the plugin, just include an instance in your Webpack config `plugins` array:
39+
Then to install the plugin, just include an instance in your webpack config `plugins` array:
4040

4141
```javascript
4242
var HelloWorldPlugin = require('hello-world');
@@ -115,7 +115,7 @@ FileListPlugin.prototype.apply = function(compiler) {
115115
filelist += ('- '+ filename +'\n');
116116
}
117117

118-
// Insert this list into the Webpack build as a new file asset:
118+
// Insert this list into the webpack build as a new file asset:
119119
compilation.assets['filelist.md'] = {
120120
source: function() {
121121
return filelist;

content/development/plugin-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports = MyPlugin;
5151

5252
### Monitoring the watch graph
5353

54-
While running Webpack middleware, each compilation includes a `fileDependencies` array (what files are being watched) and a `fileTimestamps` hash that maps watched file paths to a timestamp. These are extremely useful for detecting what files have changed within the compilation:
54+
While running webpack middleware, each compilation includes a `fileDependencies` array (what files are being watched) and a `fileTimestamps` hash that maps watched file paths to a timestamp. These are extremely useful for detecting what files have changed within the compilation:
5555

5656
```javascript
5757
function MyPlugin() {

content/development/release-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Webpack merge, tag and release process
2+
title: webpack merge, tag and release process
33
contributors:
44
- d3viant0ne
55
---

0 commit comments

Comments
 (0)