Skip to content

Commit

Permalink
misc(generators): small text improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdev committed May 28, 2019
1 parent a650e0e commit 782f56c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion packages/generators/utils/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function entry(
.prompt([
InputValidate(
"multipleEntries",
"How do you want to name your bundles? (separated by comma)",
"What do you want to name your bundles? (separated by comma)",
validate,
"pageOne, pageTwo"
)
Expand Down
51 changes: 26 additions & 25 deletions packages/webpack-scaffold/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ npm i -D webpack-cli @webpack-cli/webpack-scaffold
```

# API
- [parseValue](#parsevalue)
- [createArrowFunction](#createarrowfunction)
- [createRegularFunction](#createregularfunction)
- [createDynamicPromise](#createdynamicpromise)
- [createAssetFilterFunction](#createassetfilterfunction)
- [createExternalFunction](#createexternalfunction)
- [createRequire](#createrequire)
- [Inquirer](#inquirer)
- [List](#list)
- [RawList](#rawlist)
- [CheckList](#checklist)
- [Input](#input)
- [InputValidate](#inputvalidate)
- [Confirm](#confirm)

- [parseValue](#parsevalue)
- [createArrowFunction](#createarrowfunction)
- [createRegularFunction](#createregularfunction)
- [createDynamicPromise](#createdynamicpromise)
- [createAssetFilterFunction](#createassetfilterfunction)
- [createExternalFunction](#createexternalfunction)
- [createRequire](#createrequire)
- [Inquirer](#inquirer)
- [List](#list)
- [RawList](#rawlist)
- [CheckList](#checklist)
- [Input](#input)
- [InputValidate](#inputvalidate)
- [Confirm](#confirm)

## parseValue

Expand Down Expand Up @@ -175,7 +176,7 @@ Creates an Input from Inquirer
```js
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 @@ -185,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 validation = (value) => {
if(value.length > 4) {
return true;
} else {
return 'Wow, that was short!'
}
}
InputValidate('entry', 'what is your entry point?', validation, 'src/index')
const InputValidate = require("@webpack-cli/webpack-scaffold").InputValidate;

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

### Confirm
Expand Down

0 comments on commit 782f56c

Please sign in to comment.