1+ import * as Sentry from "@sentry/node" ;
12import chalk from "chalk" ;
23import commander from "commander" ;
3- import * as Sentry from "@sentry/node " ;
4+ import inquirer from "inquirer " ;
45
56Sentry . init ( {
67 dsn :
@@ -32,7 +33,13 @@ const main = async (): Promise<void> => {
3233 } )
3334 . option (
3435 "--typescript" ,
35- "use TypeScript as the cli application source language"
36+ "use TypeScript as the cli application source language" ,
37+ false
38+ )
39+ . option (
40+ "--interactive" ,
41+ "Have the bootstrapper walk you through the process" ,
42+ false
3643 )
3744 . on ( "--help" , ( ) => {
3845 console . log (
@@ -52,7 +59,29 @@ const main = async (): Promise<void> => {
5259 return handleIncorrectApplicationName ( program ) ;
5360 }
5461
55- if ( program . typescript ) language = "ts" ;
62+ if ( program . interactive ) {
63+ // * Interactive walk-thru
64+ // * Language
65+ const answers = await inquirer . prompt ( [
66+ {
67+ type : "list" ,
68+ name : "language" ,
69+ message : "Please select a source language:" ,
70+ choices : [
71+ { value : "js" , name : "JavaScript" } ,
72+ { value : "ts" , name : "TypeScript" } ,
73+ ] ,
74+ } ,
75+ ] ) ;
76+ const languageChoice : "js" | "ts" = answers . language ;
77+ language = languageChoice ;
78+
79+ // TODO - Compiler Choice (Babel vs. other)
80+ // TODO - Add Prettier
81+ // TODO - Add ESLint / Other Linter
82+ // TODO - Menu Color Option
83+ }
84+ if ( program . typescript && ! program . interactive ) language = "ts" ;
5685
5786 await createProjectDirectory ( applicationName , language ) ;
5887
0 commit comments