Skip to content

Commit e9ccd53

Browse files
authored
Merge pull request #316 from webpack/spelling/node-js
Replace node.js with Node.js
2 parents 446b1c4 + da19b34 commit e9ccd53

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

content/concepts/targets.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ module.exports = config;
2626

2727
The following is a list of values you can pass to the `target` property.
2828

29-
* `"async-node"` Compile for usage in a node.js-like environment (use `fs` and `vm` to load chunks async)
29+
* `"async-node"` Compile for usage in a Node.js-like environment (use `fs` and `vm` to load chunks async)
3030
* `"electron-main"` Compile for electron renderer process, provide a target using `JsonpTemplatePlugin`, `FunctionModulePlugin` for browser environment and `NodeTargetPlugin` and `ExternalsPlugin` for commonjs and electron bulit-in modules. *Note: need `webpack` >= 1.12.15.
31-
* `"node"` Compile for usage in a node.js-like environment (uses node.js `require` to load chunks)
32-
* `"node-webkit"` Compile for usage in webkit, uses jsonp chunk loading but also supports build in node.js modules plus require("nw.gui") (experimental)
31+
* `"node"` Compile for usage in a Node.js-like environment (uses Node.js `require` to load chunks)
32+
* `"node-webkit"` Compile for usage in webkit, uses jsonp chunk loading but also supports build in Node.js modules plus require("nw.gui") (experimental)
3333
* `"web"` Compile for usage in a browser-like environment (default)
3434
* `"webworker"` Compile as WebWorker
3535

content/configuration/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ T> Notice that throughout the configuration we use Node's built-in [path module]
3232
3333
[path](/configuration/output#output-path): path.resolve(__dirname, "dist"), // string
3434
// the target directory for all output files
35-
// must be an absolute path (use the node.js path module)
35+
// must be an absolute path (use the Node.js path module)
3636
3737
<details><summary>[filename](/configuration/output#output-filename): "bundle.js", // string</summary>
3838
[filename](/configuration/output#output-filename): "[name].js", // for multiple entry points
@@ -299,8 +299,8 @@ T> Notice that throughout the configuration we use Node's built-in [path module]
299299
300300
<details><summary>[target](/configuration/target): "web", // enum</summary>
301301
[target](/configuration/target): "webworker", // WebWorker
302-
[target](/configuration/target): "node", // node.js via require
303-
[target](/configuration/target): "async-node", // node.js via fs and vm
302+
[target](/configuration/target): "node", // Node.js via require
303+
[target](/configuration/target): "async-node", // Node.js via fs and vm
304304
[target](/configuration/target): "node-webkit", // nw.js
305305
[target](/configuration/target): "electron-main", // electron, main process
306306
[target](/configuration/target): "electron-renderer", // electron, renderer process

content/configuration/node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ node: {
2323
}
2424
```
2525

26-
?> Elaborate on this section. What does "mock" or "empty" do? Does `<node builtin>` in the current documentation mean you can enable, disable, or polyfill any global node functions? (it seems `setImmediate` is the example for that)
26+
?> Elaborate on this section. What does "mock" or "empty" do? Does `<node builtin>` in the current documentation mean you can enable, disable, or polyfill any global Node.js function? (it seems `setImmediate` is the example for that)

content/configuration/resolve.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ For example, the `package.json` of [D3](https://d3js.org/) contains these fields
159159
```js
160160
{
161161
...
162-
main: 'build/d3.node.js',
162+
main: 'build/d3.Node.js',
163163
browser: 'build/d3.js',
164164
module: 'index',
165165
...
166166
}
167167
```
168168

169-
This means that when we `import * as D3 from "d3"` this will really resolve to the file in the `browser` property. The `browser` property takes precedence here because it's the first item in `mainFields`. Meanwhile, a node application bundled by webpack will resolve by default to the file in the `module` field.
169+
This means that when we `import * as D3 from "d3"` this will really resolve to the file in the `browser` property. The `browser` property takes precedence here because it's the first item in `mainFields`. Meanwhile, a Node.js application bundled by webpack will resolve by default to the file in the `module` field.
170170

171171

172172
## `resolve.mainFiles`

content/configuration/target.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Tell webpack what environment the application is targeting. The following option
2222
`target: "webworker"` - Compile as a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)
2323

2424

25-
T> Allows importing of built-in node modules and [`nw.gui`](http://docs.nwjs.io/en/latest/) (experimental).
25+
T> Allows importing of built-in Node.js modules and [`nw.gui`](http://docs.nwjs.io/en/latest/) (experimental).
2626

2727
`target: "async-node"` - Use `fs` and `vm` to load chunks asynchronously
2828

content/how-to/author-libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ This means that your library expects a dependency named `lodash` to be available
138138

139139
### Add `libraryTarget`
140140

141-
For widespread use of the library, we would like it to be compatible in different environments, ie CommonJs, AMD, nodejs and as a global variable.
141+
For widespread use of the library, we would like it to be compatible in different environments, i. e. CommonJs, AMD, Node.js and as a global variable.
142142

143143
To make your library available for reuse, add `library` property in webpack configuration.
144144

content/how-to/cache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ A sample output of webpack-manifest-plugin for our config looks like:
135135
}
136136
```
137137

138-
The rest depends on your server setup. There is a nice [walk through for Rails-based projects](http://clarkdave.net/2015/01/how-to-use-webpack-with-rails/#including-precompiled-assets-in-views). For serverside rendering in node you can use [webpack-isomorphic-tools](https://github.com/halt-hammerzeit/webpack-isomorphic-tools). Or, if your application doesn’t rely on any server-side rendering, it’s often enough to generate a single `index.html` file for your application. To do so, just use these 2 amazing plugins:
138+
The rest depends on your server setup. There is a nice [walk through for Rails-based projects](http://clarkdave.net/2015/01/how-to-use-webpack-with-rails/#including-precompiled-assets-in-views). For serverside rendering in Node.js you can use [webpack-isomorphic-tools](https://github.com/halt-hammerzeit/webpack-isomorphic-tools). Or, if your application doesn’t rely on any server-side rendering, it’s often enough to generate a single `index.html` file for your application. To do so, just use these 2 amazing plugins:
139139

140140
* https://github.com/ampedandwired/html-webpack-plugin
141141
* https://github.com/szrenwei/inline-manifest-webpack-plugin

content/how-to/generate-production-build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ One of the good options to go is using `cheap-module-source-map` which simplifie
2020

2121
## Node environment variable
2222

23-
The second step is to tell webpack to generate a production build by setting the node environment variable to `production`. webpack will not include any extra useful code, warnings and checks used in development.
23+
The second step is to tell webpack to generate a production build by setting the Node.js environment variable to `production`. webpack will not include any extra useful code, warnings and checks used in development.
2424

25-
The `DefinePlugin` creates **compile** time constants. Useful for injecting your node environment as seen below.
25+
The `DefinePlugin` creates **compile** time constants. Useful for injecting your Node.js environment as seen below.
2626

2727
?> TODO: Add a link to the `ProvidePlugin` documentation
2828

0 commit comments

Comments
 (0)