@@ -11,20 +11,21 @@ npm i -D webpack-cli @webpack-cli/webpack-scaffold
11
11
```
12
12
13
13
# API
14
- - [ parseValue] ( #parsevalue )
15
- - [ createArrowFunction] ( #createarrowfunction )
16
- - [ createRegularFunction] ( #createregularfunction )
17
- - [ createDynamicPromise] ( #createdynamicpromise )
18
- - [ createAssetFilterFunction] ( #createassetfilterfunction )
19
- - [ createExternalFunction] ( #createexternalfunction )
20
- - [ createRequire] ( #createrequire )
21
- - [ Inquirer] ( #inquirer )
22
- - [ List] ( #list )
23
- - [ RawList] ( #rawlist )
24
- - [ CheckList] ( #checklist )
25
- - [ Input] ( #input )
26
- - [ InputValidate] ( #inputvalidate )
27
- - [ Confirm] ( #confirm )
14
+
15
+ - [ parseValue] ( #parsevalue )
16
+ - [ createArrowFunction] ( #createarrowfunction )
17
+ - [ createRegularFunction] ( #createregularfunction )
18
+ - [ createDynamicPromise] ( #createdynamicpromise )
19
+ - [ createAssetFilterFunction] ( #createassetfilterfunction )
20
+ - [ createExternalFunction] ( #createexternalfunction )
21
+ - [ createRequire] ( #createrequire )
22
+ - [ Inquirer] ( #inquirer )
23
+ - [ List] ( #list )
24
+ - [ RawList] ( #rawlist )
25
+ - [ CheckList] ( #checklist )
26
+ - [ Input] ( #input )
27
+ - [ InputValidate] ( #inputvalidate )
28
+ - [ Confirm] ( #confirm )
28
29
29
30
## parseValue
30
31
@@ -175,7 +176,7 @@ Creates an Input from Inquirer
175
176
``` js
176
177
const Input = require (" @webpack-cli/webpack-scaffold" ).Input ;
177
178
178
- Input (' entry' , ' what is your entry point?' , ' src/index' )
179
+ Input (" entry" , " what is your entry point?" , " src/index" );
179
180
```
180
181
181
182
### InputValidate
@@ -185,16 +186,16 @@ Param: `name<String>, message<String>, [validate<Function>, default<String>]`
185
186
Creates an Input from Inquirer
186
187
187
188
``` js
188
- const InputValidate = require (' @webpack-cli/webpack-scaffold' ).InputValidate ;
189
-
190
- const validation = ( value ) => {
191
- if (value .length > 4 ) {
192
- return true ;
193
- } else {
194
- return ' Wow, that was short! '
195
- }
196
- }
197
- InputValidate (' entry' , ' what is your entry point?' , validation, ' src/index' )
189
+ const InputValidate = require (" @webpack-cli/webpack-scaffold" ).InputValidate ;
190
+
191
+ const validation = value => {
192
+ if (value .length > 4 ) {
193
+ return true ;
194
+ } else {
195
+ return " The entry point must be longer than 4, try again " ;
196
+ }
197
+ };
198
+ InputValidate (" entry" , " what is your entry point?" , validation, " src/index" );
198
199
```
199
200
200
201
### Confirm
0 commit comments