11import chalk from "chalk" ;
22import * as logSymbols from "log-symbols" ;
33import * as Generator from "yeoman-generator" ;
4- import * as Inquirer from "inquirer" ;
54import * as path from "path" ;
65
76import { getPackageManager } from "@webpack-cli/utils/package-manager" ;
@@ -142,23 +141,24 @@ export default class InitGenerator extends Generator {
142141 `Alternatively, run "webpack(-cli) --help" for usage info\n\n` ,
143142 ) ;
144143
145- const { multiEntries } : { multiEntries : boolean } = await this . prompt ( [
144+ const { multiEntries } = await this . prompt ( [
146145 Confirm (
147146 "multiEntries" ,
148147 "Will your application have multiple bundles?" ,
149148 false
150149 ) ,
151150 ] ) ;
152151
153- const entryOption : string | object = await entryQuestions ( self , multiEntries ) ;
152+ // TODO string | object
153+ const entryOption : void | { } = await entryQuestions ( self , multiEntries ) ;
154154
155155 if ( typeof entryOption === "string" && entryOption . length > 0 ) {
156156 this . configuration . config . webpackOptions . entry = `${ entryOption } ` ;
157157 } else if ( typeof entryOption === "object" ) {
158158 this . configuration . config . webpackOptions . entry = entryOption ;
159159 }
160160
161- const { outputDir } : { outputDir : string } = await this . prompt ( [
161+ const { outputDir } = await this . prompt ( [
162162 Input (
163163 "outputDir" ,
164164 "In which folder do you want to store your generated bundles?" ,
@@ -186,7 +186,7 @@ export default class InitGenerator extends Generator {
186186 `path.resolve(__dirname, '${ outputDir } ')` ;
187187 }
188188
189- const { langType } : { langType : string } = await this . prompt ( [
189+ const { langType } = await this . prompt ( [
190190 List ( "langType" , "Will you use one of the below JS solutions?" , [
191191 LangType . ES6 ,
192192 LangType . Typescript ,
@@ -197,7 +197,7 @@ export default class InitGenerator extends Generator {
197197 langQuestionHandler ( this , langType ) ;
198198 this . langType = langType ;
199199
200- const { stylingType } : { stylingType : string } = await this . prompt ( [
200+ const { stylingType } = await this . prompt ( [
201201 List ( "stylingType" , "Will you use one of the below CSS solutions?" , [
202202 "No" ,
203203 StylingType . CSS ,
@@ -211,7 +211,7 @@ export default class InitGenerator extends Generator {
211211
212212 if ( this . isProd ) {
213213 // Ask if the user wants to use extractPlugin
214- const { useExtractPlugin } : { useExtractPlugin : string } = await this . prompt ( [
214+ const { useExtractPlugin } = await this . prompt ( [
215215 Input (
216216 "useExtractPlugin" ,
217217 "If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)" ,
@@ -294,7 +294,8 @@ export default class InitGenerator extends Generator {
294294 // Generate README
295295 this . fs . copyTpl (
296296 path . resolve ( __dirname , "./templates/README.md" ) ,
297- this . destinationPath ( "README.md" )
297+ this . destinationPath ( "README.md" ) ,
298+ { }
298299 ) ;
299300
300301 // Genrate tsconfig
0 commit comments