@@ -75,27 +75,6 @@ export async function startNewProject(
75
75
76
76
const options : FrameworkOptions = { }
77
77
78
- if ( framework === "laravel" ) {
79
- const testFramework = await select < string > ( {
80
- message : "Which testing framework do you want to use?" ,
81
- choices : [
82
- { name : "Pest" , value : "pest" } ,
83
- { name : "PHPUnit" , value : "phpunit" } ,
84
- ] ,
85
- } )
86
-
87
- options . usePest = testFramework === "pest"
88
- const composerExists = await checkIfCommandExists ( "composer" )
89
-
90
- if ( ! composerExists ) {
91
- console . info ( "" )
92
- error (
93
- "Composer is not installed on your system. \nPlease install Composer to proceed with the Laravel setup." ,
94
- )
95
- process . exit ( 1 )
96
- }
97
- }
98
-
99
78
if ( framework === "next" ) {
100
79
const wantSrcFolder = await input ( {
101
80
message : `Do you want to use the src folder? (Y/${ grayText ( "n" ) } )` ,
@@ -120,16 +99,19 @@ export async function startNewProject(
120
99
} ,
121
100
} )
122
101
123
- const packageManager = await select < PackageManager > ( {
124
- message : "Which package manager do you want to use?" ,
125
- choices : [
126
- { name : "Bun" , value : "bun" } ,
127
- { name : "Yarn" , value : "yarn" } ,
128
- { name : "npm" , value : "npm" } ,
129
- { name : "pnpm" , value : "pnpm" } ,
130
- ] ,
131
- default : "bun" ,
132
- } )
102
+ let packageManager : PackageManager = "bun"
103
+ if ( framework !== "laravel" ) {
104
+ packageManager = await select < PackageManager > ( {
105
+ message : "Which package manager do you want to use?" ,
106
+ choices : [
107
+ { name : "Bun" , value : "bun" } ,
108
+ { name : "Yarn" , value : "yarn" } ,
109
+ { name : "npm" , value : "npm" } ,
110
+ { name : "pnpm" , value : "pnpm" } ,
111
+ ] ,
112
+ default : "bun" ,
113
+ } )
114
+ }
133
115
134
116
if ( packageManager !== "npm" ) {
135
117
const packageManagerExists = await checkIfCommandExists ( packageManager )
@@ -174,10 +156,11 @@ export async function startNewProject(
174
156
// const isDev = process.env.NODE_ENV !== "development"
175
157
// const cliCommand = isDev ? "justd-cli" : "justd-cli@latest"
176
158
177
- // const cliCommand = "justd-cli"
178
- const cliCommand = "justd-cli@latest"
159
+ const cliCommand = "justd-cli"
160
+ // const cliCommand = "justd-cli@latest"
179
161
const tsOrJs = language === "typescript" ? "--ts" : "--js"
180
- const initJustdCommand = [ "npx" , cliCommand , "init" , tsOrJs , "--force" , "--yes" ]
162
+ // const initJustdCommand = ["npx", cliCommand, "init", tsOrJs, "--force", "--yes"]
163
+ const initJustdCommand = [ "bunx" , cliCommand , "init" , tsOrJs , "--force" , "--yes" ]
181
164
await executeCommand ( initJustdCommand , "Finishing." )
182
165
183
166
console . info ( "\nProject setup is now complete." )
0 commit comments