@@ -11,15 +11,20 @@ npm i -D webpack-cli @webpack-cli/webpack-scaffold
11
11
```
12
12
13
13
# API
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 ) - [ List] ( #list ) - [ RawList] ( #rawlist ) - [ CheckList] ( #checklist ) - [ Input] ( #input ) - [ InputValidate] ( #inputvalidate ) - [ Confirm] ( #confirm )
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 )
23
28
24
29
## parseValue
25
30
@@ -163,38 +168,38 @@ CheckList("entry", "what kind of entry do you want?", ["Array", "Function"]);
163
168
164
169
### Input
165
170
166
- Param: ` name<String>, message<String> `
171
+ Param: ` name<String>, message<String>, [default<String>] `
167
172
168
173
Creates an Input from Inquirer
169
174
170
175
``` js
171
176
const Input = require (" @webpack-cli/webpack-scaffold" ).Input ;
172
177
173
- Input (" entry" , " what is your entry point?" );
178
+ Input (' entry' , ' what is your entry point?' , ' src/index ' )
174
179
```
175
180
176
181
### InputValidate
177
182
178
- Param: ` name<String>, message<String>, validate<Function> `
183
+ Param: ` name<String>, message<String>, [ validate<Function>, default<String>] `
179
184
180
185
Creates an Input from Inquirer
181
186
182
187
``` js
183
- const InputValidate = require (" @webpack-cli/webpack-scaffold" ).InputValidate ;
184
-
185
- const validation = value => {
186
- if (value .length > 4 ) {
187
- return true ;
188
- } else {
189
- return " Wow, that was short!" ;
190
- }
191
- };
192
- InputValidate (" entry" , " what is your entry point?" , validation);
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 ' )
193
198
```
194
199
195
200
### Confirm
196
201
197
- Param: ` name<String>, message<String>, default<? Boolean> `
202
+ Param: ` name<String>, message<String>, [ default<Boolean>] `
198
203
199
204
Creates an Input from Inquirer
200
205
0 commit comments