Skip to content

Commit

Permalink
Fixing the typos and grammatical errors in Readme files (#1246)
Browse files Browse the repository at this point in the history
* chore: fix grammatical errors

* chore: fix typos
  • Loading branch information
mohitm15 authored Feb 23, 2020
1 parent 7faaed2 commit 52956a2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ webpack CLI is currently supporting webpack v4 and webpack v5. Security fixes ar

## Reporting a Vulnerability

To report a vulnerability, please contact one of webpack maintainers through the email provided from either npm, GitHub or reach out at other social media platforms. For third party security vulnerabilities, submitting an issue or Pull Request to fix the security vulerability is much appreciated.
To report a vulnerability, please contact one of webpack maintainers through the email provided from either npm, GitHub or reach out at other social media platforms. For third party security vulnerabilities, submitting an issue or Pull Request to fix the security vulnerability is much appreciated.
66 changes: 33 additions & 33 deletions packages/webpack-scaffold/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Param: `String`
Used when you cannot use regular conventions. Handy for examples like `RegExp` or `output.sourcePrefix`

```js
const parseValue = require("@webpack-cli/webpack-scaffold").parseValue;
const parseValue = require('@webpack-cli/webpack-scaffold').parseValue;

this.configuration.myScaffold.webpackOptions.output.sourcePrefix = parseValue("\t");
this.configuration.myScaffold.webpackOptions.output.sourcePrefix = parseValue('\t');
// sourcePrefix: '\t'
```

Expand All @@ -47,9 +47,9 @@ Param: `String`
Generally used when dealing with an entry point as an arrow function

```js
const createArrowFunction = require("@webpack-cli/webpack-scaffold").createArrowFunction;
const createArrowFunction = require('@webpack-cli/webpack-scaffold').createArrowFunction;

this.configuration.myScaffold.webpackOptions.entry = createArrowFunction("app.js");
this.configuration.myScaffold.webpackOptions.entry = createArrowFunction('app.js');
// entry: () => 'app.js'
```

Expand All @@ -60,9 +60,9 @@ Param: `String`
Used when creating a function that returns a single value

```js
const createRegularFunction = require("@webpack-cli/webpack-scaffold").createRegularFunction;
const createRegularFunction = require('@webpack-cli/webpack-scaffold').createRegularFunction;

this.configuration.myScaffold.webpackOptions.entry = createRegularFunction("app.js");
this.configuration.myScaffold.webpackOptions.entry = createRegularFunction('app.js');
// entry: function() { return 'app.js' }
```

Expand All @@ -73,12 +73,12 @@ Param: `Array` | `String`
Used to create a dynamic entry point

```js
const createDynamicPromise = require("@webpack-cli/webpack-scaffold").createDynamicPromise;
const createDynamicPromise = require('@webpack-cli/webpack-scaffold').createDynamicPromise;

this.confguration.myScaffold.webpackOptions.entry = createDynamicPromise("app.js");
this.confguration.myScaffold.webpackOptions.entry = createDynamicPromise('app.js');
// entry: () => new Promise((resolve) => resolve('app.js'))

this.configuration.myScaffold.webpackOptions.entry = createDynamicPromise(["app.js", "index.js"]);
this.configuration.myScaffold.webpackOptions.entry = createDynamicPromise(['app.js', 'index.js']);
// entry: () => new Promise((resolve) => resolve(['app.js','index.js']))
```

Expand All @@ -89,22 +89,22 @@ Param: `String`
Used to create an [assetFilterFunction](https://webpack.js.org/configuration/performance/#performance-assetfilter)

```js
const createAssetFilterFunction = require("@webpack-cli/webpack-scaffold").createAssetFilterFunction;
const createAssetFilterFunction = require('@webpack-cli/webpack-scaffold').createAssetFilterFunction;

this.configuration.myScaffold.webpackOptions.performance.assetFilter = createAssetFilterFunction("js");
this.configuration.myScaffold.webpackOptions.performance.assetFilter = createAssetFilterFunction('js');
// assetFilter: function (assetFilename) { return assetFilename.endsWith('.js'); }
```

## createExternalFunction

Param: `String`

Used to create an [general function from Externals](https://webpack.js.org/configuration/externals/#function)
Used to create a [general function from Externals](https://webpack.js.org/configuration/externals/#function)

```js
const createExternalFunction = require("@webpack-cli/webpack-scaffold").createExternalFunction;
const createExternalFunction = require('@webpack-cli/webpack-scaffold').createExternalFunction;

this.configuration.myScaffold.webpackOptions.externals = [createExternalFunction("^yourregex$")];
this.configuration.myScaffold.webpackOptions.externals = [createExternalFunction('^yourregex$')];
/*
externals: [
function(context, request, callback) {
Expand All @@ -123,9 +123,9 @@ Param: `String`
Used to create a module in `topScope`

```js
const createRequire = require("@webpack-cli/webpack-scaffold").createRequire;
const createRequire = require('@webpack-cli/webpack-scaffold').createRequire;

this.configuration.myScaffold.topScope = [createRequire("webpack")];
this.configuration.myScaffold.topScope = [createRequire('webpack')];
// const webpack = require('webpack')
```

Expand All @@ -138,9 +138,9 @@ Param: `name<String>, message<String>, choices<Array>`
Creates a List from Inquirer

```js
const List = require("@webpack-cli/webpack-scaffold").List;
const List = require('@webpack-cli/webpack-scaffold').List;

List("entry", "what kind of entry do you want?", ["Array", "Function"]);
List('entry', 'what kind of entry do you want?', ['Array', 'Function']);
```

### RawList
Expand All @@ -150,9 +150,9 @@ Param: `name<String>, message<String>, choices<Array>`
Creates a RawList from Inquirer

```js
const RawList = require("@webpack-cli/webpack-scaffold").RawList;
const RawList = require('@webpack-cli/webpack-scaffold').RawList;

RawList("entry", "what kind of entry do you want?", ["Array", "Function"]);
RawList('entry', 'what kind of entry do you want?', ['Array', 'Function']);
```

### CheckList
Expand All @@ -162,9 +162,9 @@ Param: `name<String>, message<String>, choices<Array>`
Creates a CheckList(`checkbox`) from Inquirer

```js
const CheckList = require("@webpack-cli/webpack-scaffold").CheckList;
const CheckList = require('@webpack-cli/webpack-scaffold').CheckList;

CheckList("entry", "what kind of entry do you want?", ["Array", "Function"]);
CheckList('entry', 'what kind of entry do you want?', ['Array', 'Function']);
```

### Input
Expand All @@ -174,9 +174,9 @@ Param: `name<String>, message<String>, [default<String>]`
Creates an Input from Inquirer

```js
const Input = require("@webpack-cli/webpack-scaffold").Input;
const Input = require('@webpack-cli/webpack-scaffold').Input;

Input("entry", "what is your entry point?", "src/index");
Input('entry', 'what is your entry point?', 'src/index');
```

### InputValidate
Expand All @@ -186,16 +186,16 @@ Param: `name<String>, message<String>, [validate<Function>, default<String>]`
Creates an Input from Inquirer

```js
const InputValidate = require("@webpack-cli/webpack-scaffold").InputValidate;
const InputValidate = require('@webpack-cli/webpack-scaffold').InputValidate;

const validation = value => {
if (value.length > 4) {
return true;
} else {
return "Your answer must be longer than 4 characters, try again";
}
if (value.length > 4) {
return true;
} else {
return 'Your answer must be longer than 4 characters, try again';
}
};
InputValidate("entry", "what is your entry point?", validation, "src/index");
InputValidate('entry', 'what is your entry point?', validation, 'src/index');
```

### Confirm
Expand All @@ -205,9 +205,9 @@ Param: `name<String>, message<String>, [default<Boolean>]`
Creates an Input from Inquirer

```js
const Confirm = require("@webpack-cli/webpack-scaffold").Confirm;
const Confirm = require('@webpack-cli/webpack-scaffold').Confirm;

Confirm("contextConfirm", "Is this your context?");
Confirm('contextConfirm', 'Is this your context?');
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/webpack-scaffold.svg
Expand Down

0 comments on commit 52956a2

Please sign in to comment.