@@ -5,11 +5,11 @@ import path from "node:path";
5
5
import process from "node:process" ;
6
6
import pico from "picocolors" ;
7
7
8
- import { frameworkOptions , frameworks } from "./constants " ;
8
+ import { addTsconfigBuild } from "./stages/add-tsconfig.build.json " ;
9
9
import { updateEslintFiles } from "./stages/update-eslint-files" ;
10
10
import { updatePackageJson } from "./stages/update-package-json" ;
11
11
import { updateVscodeSettings } from "./stages/update-vscode-settings" ;
12
- import type { FrameworkOption , PromItem , PromptResult } from "./types" ;
12
+ import type { FrameworkOption , PromptResult } from "./types" ;
13
13
import { isGitClean } from "./utils" ;
14
14
15
15
export interface CliRunOptions {
@@ -38,26 +38,6 @@ export async function run(options: CliRunOptions = {}): Promise<undefined> {
38
38
if ( ! argumentSkipPrompt ) {
39
39
result = ( await p . group (
40
40
{
41
- frameworks : ( { results } ) => {
42
- const isArgumentTemplateValid =
43
- typeof argumentTemplate === "string" &&
44
- ! ! frameworks . includes ( < FrameworkOption > argumentTemplate ) ;
45
-
46
- if ( ! results . uncommittedConfirmed || isArgumentTemplateValid ) {
47
- return ;
48
- }
49
-
50
- const message =
51
- ! isArgumentTemplateValid && argumentTemplate
52
- ? `"${ argumentTemplate } " isn't a valid template. Please choose from below: `
53
- : "Select a framework:" ;
54
-
55
- return p . multiselect < Array < PromItem < FrameworkOption > > , FrameworkOption > ( {
56
- message : pico . reset ( message ) ,
57
- options : frameworkOptions ,
58
- required : false ,
59
- } ) ;
60
- } ,
61
41
uncommittedConfirmed : ( ) => {
62
42
if ( argumentSkipPrompt || isGitClean ( ) ) {
63
43
return Promise . resolve ( true ) ;
@@ -94,9 +74,10 @@ export async function run(options: CliRunOptions = {}): Promise<undefined> {
94
74
}
95
75
}
96
76
97
- await updatePackageJson ( result ) ;
98
- await updateEslintFiles ( result ) ;
77
+ await updatePackageJson ( ) ;
78
+ await updateEslintFiles ( ) ;
99
79
await updateVscodeSettings ( result ) ;
80
+ await addTsconfigBuild ( ) ;
100
81
101
82
p . log . success ( pico . green ( `Setup completed` ) ) ;
102
83
p . outro ( `Now you can update the dependencies and run ${ pico . blue ( "eslint . --fix" ) } \n` ) ;
0 commit comments