Skip to content

Commit

Permalink
chore: setup cspell
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Mar 12, 2020
1 parent 361cd7a commit dafa4cd
Show file tree
Hide file tree
Showing 70 changed files with 494 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
**If the current behavior is a bug, please provide the steps to reproduce.**

<!-- A great way to do this is to provide your configuration via a GitHub gist. -->
<!-- Best provide a minimal reproduceable repo -->
<!-- Best provide a minimal reproducible repo -->
<!-- If your issue is caused by a plugin or loader file the issue on the plugin/loader repo -->

**What is the expected behavior?**
Expand Down
2 changes: 1 addition & 1 deletion bin/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @param {string} command process to run
* @param {string[]} args commandline arguments
* @param {string[]} args command line arguments
* @returns {Promise<void>} promise
*/
const runCommand = (command, args) => {
Expand Down
6 changes: 3 additions & 3 deletions examples/buildAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
const cp = require("child_process");
const examples = require("./examples");

const cmds = examples.map(function(dirname) {
const commands = examples.map(function(dirname) {
return "cd " + dirname + " && node build.js";
});

let failed = 0;
let i = 0;
for(const cmd of cmds) {
console.log(`[${++i}/${cmds.length}] ${cmd}`);
for(const cmd of commands) {
console.log(`[${++i}/${commands.length}] ${cmd}`);
try {
cp.execSync(cmd, { encoding: "utf-8" });
} catch(e) {
Expand Down
4 changes: 2 additions & 2 deletions examples/harmony-interop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fs2.readFile("file");
import { readFile as readFile2 } from "./reexport-commonjs";
readFile2("file");

// import a CommonJs module for sideeffects
// import a CommonJs module for side effects
import "./example2";
```

Expand Down Expand Up @@ -97,7 +97,7 @@ _fs__WEBPACK_IMPORTED_MODULE_0__.readFile("file");

(0,_reexport_commonjs__WEBPACK_IMPORTED_MODULE_1__.readFile)("file");

// import a CommonJs module for sideeffects
// import a CommonJs module for side effects



Expand Down
2 changes: 1 addition & 1 deletion examples/harmony-interop/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ fs2.readFile("file");
import { readFile as readFile2 } from "./reexport-commonjs";
readFile2("file");

// import a CommonJs module for sideeffects
// import a CommonJs module for side effects
import "./example2";
4 changes: 2 additions & 2 deletions examples/hybrid-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ window.onLinkToPage = function onLinkToPage(name) { // name is "a" or "b"
// require the page with a dynamic require

// It's important that this require only matches the pages
// elsewise there is blood in the bundle. Here this is done with a
// otherwise there is blood in the bundle. Here this is done with a
// specific file prefix. It's also possible to use a directory,
// overwriting the RegExp with the ContextReplacementPlugin, or
// using the require.context method.
Expand Down Expand Up @@ -119,7 +119,7 @@ window.onLinkToPage = function onLinkToPage(name) { // name is "a" or "b"
// require the page with a dynamic require

// It's important that this require only matches the pages
// elsewise there is blood in the bundle. Here this is done with a
// otherwise there is blood in the bundle. Here this is done with a
// specific file prefix. It's also possible to use a directory,
// overwriting the RegExp with the ContextReplacementPlugin, or
// using the require.context method.
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid-routing/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ window.onLinkToPage = function onLinkToPage(name) { // name is "a" or "b"
// require the page with a dynamic require

// It's important that this require only matches the pages
// elsewise there is blood in the bundle. Here this is done with a
// otherwise there is blood in the bundle. Here this is done with a
// specific file prefix. It's also possible to use a directory,
// overwriting the RegExp with the ContextReplacementPlugin, or
// using the require.context method.
Expand Down
4 changes: 2 additions & 2 deletions examples/loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// use our loader
console.dir(require("./loader!./file"));

// use buildin css loader
// use built-in css loader
console.dir(require("./test.css")); // default by extension
console.dir(require("!css-loader!./test.css")); // manual
```
Expand Down Expand Up @@ -212,7 +212,7 @@ function toComment(sourceMap) {
// use our loader
console.dir(__webpack_require__(/*! ./loader!./file */ 1));

// use buildin css loader
// use built-in css loader
console.dir(__webpack_require__(/*! ./test.css */ 2)); // default by extension
console.dir(__webpack_require__(/*! css-loader!./test.css */ 2)); // manual

Expand Down
2 changes: 1 addition & 1 deletion examples/loader/example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// use our loader
console.dir(require("./loader!./file"));

// use buildin css loader
// use built-in css loader
console.dir(require("./test.css")); // default by extension
console.dir(require("!css-loader!./test.css")); // manual
2 changes: 1 addition & 1 deletion examples/many-pages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following configuration is used:

The threshold is here 40 bytes, but by default (in a real application) 30kb.

Some modules are intentially duplicated, i. e. `./stuff/s4.js` is shared by `pageA` and `pageC`, but it's the only shared module so no separate output file is created because it would be smaller than the threshold. A separate request (which comes with an overhead and worsen gzipping) is not worth the extra bytes.
Some modules are intentionally duplicated, i. e. `./stuff/s4.js` is shared by `pageA` and `pageC`, but it's the only shared module so no separate output file is created because it would be smaller than the threshold. A separate request (which comes with an overhead and worsen gzipping) is not worth the extra bytes.

Note: decreasing `maxInitial/AsyncRequest` will increase duplication further to reduce the number of requests. Duplication doesn't affect initial page load, it only affects download size of navigations to other pages of the application.

Expand Down
2 changes: 1 addition & 1 deletion examples/many-pages/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following configuration is used:

The threshold is here 40 bytes, but by default (in a real application) 30kb.

Some modules are intentially duplicated, i. e. `./stuff/s4.js` is shared by `pageA` and `pageC`, but it's the only shared module so no separate output file is created because it would be smaller than the threshold. A separate request (which comes with an overhead and worsen gzipping) is not worth the extra bytes.
Some modules are intentionally duplicated, i. e. `./stuff/s4.js` is shared by `pageA` and `pageC`, but it's the only shared module so no separate output file is created because it would be smaller than the threshold. A separate request (which comes with an overhead and worsen gzipping) is not worth the extra bytes.

Note: decreasing `maxInitial/AsyncRequest` will increase duplication further to reduce the number of requests. Duplication doesn't affect initial page load, it only affects download size of navigations to other pages of the application.

Expand Down
2 changes: 1 addition & 1 deletion examples/side-effects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ After being built by webpack, the output bundle contains `index.js` `a.js` `b.js
Advantages:

- Smaller bundles
- Faster bootup
- Faster boot up

# example.js

Expand Down
2 changes: 1 addition & 1 deletion examples/side-effects/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ After being built by webpack, the output bundle contains `index.js` `a.js` `b.js
Advantages:

- Smaller bundles
- Faster bootup
- Faster boot up

# example.js

Expand Down
10 changes: 5 additions & 5 deletions examples/source-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ race = function(winner, ...runners) {
//# sourceMappingURL=bundle-source-map.js.map
```

```javascript
```json
{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAAA;;AAGA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX;AAFR,EAJF;;;AASA,OAAO,SAAC,MAAD,KAAS,OAAT;SACL,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n"],"sourceRoot":""}
```

Expand Down Expand Up @@ -127,7 +127,7 @@ race = function(winner, ...runners) {
],[[0,0]]]);
```

```javascript
```json
{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAAA;;AAGA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX;AAFR,EAJF;;;AASA,OAAO,SAAC,MAAD,KAAS,OAAT;SACL,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-hidden-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n"],"sourceRoot":""}
```

Expand Down Expand Up @@ -169,7 +169,7 @@ race = function(winner, ...runners) {

## nosources-source-map.js.map

```javascript
```json
{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAAA;;AAGA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX;AAFR,EAJF;;;AASA,OAAO,SAAC,MAAD,KAAS,OAAT;SACL,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-nosources-source-map.js","sourceRoot":""}
```

Expand Down Expand Up @@ -247,13 +247,13 @@ eval("// Taken from http://coffeescript.org/\n\n// Objects:\nvar math, race;\n\n

## cheap-module-source-map.js.map

```javascript
```json
{"version":3,"file":"./bundle-cheap-module-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["# Taken from http://coffeescript.org/\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n"],"mappings":";;;;;;;;;AAAA;AACA;;AADA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAFA;AACA;;AAIA;AACA;AADA;;;;A","sourceRoot":""}
```

## cheap-source-map.js.map

```javascript
```json
{"version":3,"file":"./bundle-cheap-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["// Taken from http://coffeescript.org/\n\n// Objects:\nvar math, race;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\n// Splats:\nrace = function(winner, ...runners) {\n return print(winner, runners);\n};\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
```

Expand Down
10 changes: 5 additions & 5 deletions examples/source-map/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _{{webpack.config.js}}_
_{{dist/bundle-source-map.js}}_
```

```javascript
```json
_{{dist/bundle-source-map.js.map}}_
```

Expand All @@ -30,7 +30,7 @@ _{{dist/bundle-source-map.js.map}}_
_{{dist/bundle-hidden-source-map.js}}_
```

```javascript
```json
_{{dist/bundle-hidden-source-map.js.map}}_
```

Expand All @@ -42,7 +42,7 @@ _{{dist/bundle-inline-source-map.js}}_

## nosources-source-map.js.map

```javascript
```json
_{{dist/bundle-nosources-source-map.js.map}}_
```

Expand Down Expand Up @@ -72,13 +72,13 @@ _{{dist/bundle-eval-cheap-module-source-map.js}}_

## cheap-module-source-map.js.map

```javascript
```json
_{{dist/bundle-cheap-module-source-map.js.map}}_
```

## cheap-source-map.js.map

```javascript
```json
_{{dist/bundle-cheap-source-map.js.map}}_
```

Expand Down
2 changes: 1 addition & 1 deletion examples/top-level-await/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export const AlternativeCreateUserAction = async name => {
};

// Note: Using await import() at top-level doesn't make much sense
// except in rare cases. It will import modules sequencially.
// except in rare cases. It will import modules sequentially.
4 changes: 2 additions & 2 deletions examples/top-level-await/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const AlternativeCreateUserAction = async name => {
};

// Note: Using await import() at top-level doesn't make much sense
// except in rare cases. It will import modules sequencially.
// except in rare cases. It will import modules sequentially.
```

As `Actions.js` doesn't use any top-level-await nor `import await` it's not an async module.
Expand Down Expand Up @@ -187,7 +187,7 @@ const AlternativeCreateUserAction = async name => {
};

// Note: Using await import() at top-level doesn't make much sense
// except in rare cases. It will import modules sequencially.
// except in rare cases. It will import modules sequentially.


/***/ })
Expand Down
2 changes: 1 addition & 1 deletion lib/CaseSensitiveModulesWarning.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const sortModules = modules => {
/**
* @param {Module[]} modules each module from throw
* @param {ModuleGraph} moduleGraph the module graph
* @returns {string} each message from provided moduels
* @returns {string} each message from provided modules
*/
const createModulesListMessage = (modules, moduleGraph) => {
return modules
Expand Down
6 changes: 3 additions & 3 deletions lib/Compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ class Compilation {
}

/**
* @param {Module} module moulde to report from
* @param {Module} module module to report from
* @param {DependenciesBlock[]} blocks blocks to report from
* @returns {void}
*/
Expand Down Expand Up @@ -2074,7 +2074,7 @@ class Compilation {
moduleGraph.setDepth(module, 0);

/**
* @param {Module} module module for processeing
* @param {Module} module module for processing
* @returns {void}
*/
const processModule = module => {
Expand Down Expand Up @@ -2281,7 +2281,7 @@ class Compilation {
}

this.logger.time("hashing: sort chunks");
// clone needed as sort below is inplace mutation
// clone needed as sort below is in place mutation
const chunks = Array.from(this.chunks);
/**
* sort here will bring all "falsy" values to the beginning
Expand Down
4 changes: 2 additions & 2 deletions lib/Compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Compiler {
/** @type {SyncHook<[NormalModuleFactory]>} */
normalModuleFactory: new SyncHook(["normalModuleFactory"]),
/** @type {SyncHook<[ContextModuleFactory]>} */
contextModuleFactory: new SyncHook(["contextModulefactory"]),
contextModuleFactory: new SyncHook(["contextModuleFactory"]),

/** @type {AsyncSeriesHook<[CompilationParams]>} */
beforeCompile: new AsyncSeriesHook(["params"]),
Expand Down Expand Up @@ -640,7 +640,7 @@ class Compiler {
}

if (!info.immutable) {
// We wrote to this file before which has very likly a different content
// We wrote to this file before which has very likely a different content
// skip comparing and assume content is different for performance
// This case happens often during watch mode.
return processMissingFile();
Expand Down
6 changes: 3 additions & 3 deletions lib/ContextModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class ContextModule extends Module {
getUserRequestMap(dependencies, chunkGraph) {
const moduleGraph = chunkGraph.moduleGraph;
// if we filter first we get a new array
// therefore we dont need to create a clone of dependencies explicitly
// therefore we don't need to create a clone of dependencies explicitly
// therefore the order of this is !important!
const sortedDependencies = dependencies
.filter(dependency => moduleGraph.getModule(dependency))
Expand Down Expand Up @@ -467,7 +467,7 @@ class ContextModule extends Module {
let hasType = 0;
const comparator = compareModulesById(chunkGraph);
// if we filter first we get a new array
// therefore we dont need to create a clone of dependencies explicitly
// therefore we don't need to create a clone of dependencies explicitly
// therefore the order of this is !important!
const sortedModules = dependencies
.map(dependency => moduleGraph.getModule(dependency))
Expand Down Expand Up @@ -1004,7 +1004,7 @@ module.exports = webpackEmptyAsyncContext;`;
// base penalty
let size = 160;

// if we dont have dependencies we stop here.
// if we don't have dependencies we stop here.
for (const dependency of this.dependencies) {
const element = /** @type {ContextElementDependency} */ (dependency);
size += 5 + element.userRequest.length;
Expand Down
6 changes: 3 additions & 3 deletions lib/ContextModuleFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ module.exports = class ContextModuleFactory extends ModuleFactory {

if (!result) return callback(null, []);

const flattendResult = [];
const flattenedResult = [];

for (const item of result) {
if (item) flattendResult.push(...item);
if (item) flattenedResult.push(...item);
}

callback(null, flattendResult);
callback(null, flattenedResult);
}
);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/FileSystemInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ class FileSystemInfo {
children.add(commonSnapshot);
if (!snapshot.children) snapshot.children = new Set();
snapshot.children.add(commonSnapshot);
// Remove files from snaphot
// Remove files from snapshot
for (const path of commonMap.keys())
snapshot.fileTimestamps.delete(path);
// Create optimization entry
Expand Down
2 changes: 1 addition & 1 deletion lib/MainTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class MainTemplate {
options
);
},
"MainTemplate.getPublicPath is depreacted (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead)",
"MainTemplate.getPublicPath is deprecated (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead)",
"DEP_WEBPACK_MAIN_TEMPLATE_GET_PUBLIC_PATH"
);

Expand Down
2 changes: 1 addition & 1 deletion lib/Module.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ class Module extends DependenciesBlock {
for (const originChunk of chunkGraph.getModuleChunksIterable(
fromModule
)) {
// return true if module this is not reachable from originChunk when ignoring cunk
// return true if module this is not reachable from originChunk when ignoring chunk
if (!this.isAccessibleInChunk(chunkGraph, originChunk, chunk))
return true;
}
Expand Down
1 change: 1 addition & 0 deletions lib/ModuleFilenameHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE = /\[loaders\]\[resource\]/gi;
ModuleFilenameHelpers.RESOURCE = "[resource]";
ModuleFilenameHelpers.REGEXP_RESOURCE = /\[resource\]/gi;
ModuleFilenameHelpers.ABSOLUTE_RESOURCE_PATH = "[absolute-resource-path]";
// cSpell:words olute
ModuleFilenameHelpers.REGEXP_ABSOLUTE_RESOURCE_PATH = /\[abs(olute)?-?resource-?path\]/gi;
ModuleFilenameHelpers.RESOURCE_PATH = "[resource-path]";
ModuleFilenameHelpers.REGEXP_RESOURCE_PATH = /\[resource-?path\]/gi;
Expand Down
Loading

0 comments on commit dafa4cd

Please sign in to comment.