@@ -5,21 +5,19 @@ import path from 'path';
5
5
import parser from 'yargs-parser' ;
6
6
7
7
import { AVAILABLE_KITS , AVAILABLE_LIBRARIES } from './constants' ;
8
- import { PackageManagers } from './types' ;
9
8
import {
10
9
handleCancelation ,
11
10
getKitFromGitHub ,
12
11
initGitRepo as initializeGit ,
13
12
initNodeProject ,
14
13
removeFolder ,
15
- removeFile ,
16
14
getPmInstallCommands ,
17
15
} from './utils' ;
18
16
19
17
export async function main ( ) {
20
18
const cleanArgv = process . argv . filter ( ( arg ) => arg !== '--' ) ;
21
19
const args = parser ( cleanArgv , {
22
- string : [ 'name' , 'kit' , 'pm' ] , // --pm is the package manager. E.g: --pm yarn
20
+ string : [ 'name' , 'kit' ] ,
23
21
boolean : [ 'git' , 'yes' , 'vscode' ] ,
24
22
default : {
25
23
git : true ,
@@ -88,42 +86,6 @@ export async function main() {
88
86
89
87
handleCancelation ( useVscode ) ;
90
88
91
- let dockerSupport = false ;
92
- if ( flavor === 'application' ) {
93
- dockerSupport =
94
- 'docker' in args
95
- ? args . vscode
96
- : await confirm ( {
97
- message : 'Do you want to include Docker support?' ,
98
- initialValue : false ,
99
- } ) ;
100
- }
101
-
102
- // NPM will be the default package manager.
103
- const packageManager : PackageManagers = args . pm
104
- ? args . pm
105
- : await select ( {
106
- message : 'Select your package manager' ,
107
- options : [
108
- {
109
- value : 'npm' ,
110
- label : 'NPM' ,
111
- hint : 'Default package manager' ,
112
- } ,
113
- {
114
- value : 'yarn' ,
115
- label : 'Yarn' ,
116
- } ,
117
- {
118
- value : 'pnpm' ,
119
- label : 'PNPM' ,
120
- } ,
121
- ] ,
122
- } ) ;
123
-
124
- // If the user cancel the package manager selection, we will use NPM as default.
125
- handleCancelation ( packageManager ) ;
126
-
127
89
const install =
128
90
'yes' in args
129
91
? args . yes
@@ -152,15 +114,6 @@ export async function main() {
152
114
await removeFolder ( '.vscode' , destPath ) ;
153
115
}
154
116
155
- if ( ! dockerSupport ) {
156
- const destPath = path . join ( process . cwd ( ) , projectName as string ) ;
157
- await removeFile ( '.dockerignore' , destPath ) ;
158
- await removeFile ( 'Dockerfile' , destPath ) ;
159
- await removeFile ( 'dockerfile.dev' , destPath ) ;
160
- await removeFile ( 'docker-compose-dev.yml' , destPath ) ;
161
- await removeFile ( 'docker-compose.yml' , destPath ) ;
162
- }
163
-
164
117
if ( initGitRepo ) {
165
118
const projectFolder = path . join ( process . cwd ( ) , projectName as string ) ;
166
119
try {
@@ -171,14 +124,9 @@ export async function main() {
171
124
}
172
125
}
173
126
174
- if ( packageManager !== 'npm' ) {
175
- const destPath = path . join ( process . cwd ( ) , projectName as string ) ;
176
- await removeFile ( 'package-lock.json' , destPath ) ;
177
- }
178
-
179
127
const nextSteps = `cd ${ projectName as string } \n${
180
- install ? `${ green ( getPmInstallCommands ( packageManager ) ) } to install the dependencies\n` : ''
181
- } and ${ green ( `${ packageManager } run dev` ) } to start the development server`;
128
+ install ? `${ green ( getPmInstallCommands ( "bun" ) ) } to install the dependencies\n` : ''
129
+ } and ${ green ( `bun dev` ) } to start the development server`;
182
130
183
131
note ( nextSteps , 'Next steps:' ) ;
184
132
0 commit comments