@@ -113,7 +113,7 @@ async function main() {
113113
114114 const response = await prompts ( [
115115 {
116- type : 'select' ,
116+ type : ! ! argv . builder ? null : 'select' ,
117117 name : 'builder' ,
118118 message : 'Which libraries do you want to install?' ,
119119 choices : [
@@ -128,7 +128,7 @@ async function main() {
128128 ]
129129 } ,
130130 {
131- type : prev => prev === 'builder' ? 'text' : null ,
131+ type : prev => ! ! argv . builder || prev === 'builder' ? 'text' : null ,
132132 name : 'publicKey' ,
133133 initial : argv . publicKey || 'obtain a FREE one at https://app.vueform.com' ,
134134 message : 'Your Public Key: ' ,
@@ -157,7 +157,7 @@ async function main() {
157157 inactive : 'no' ,
158158 } ,
159159 {
160- type : ( prev , { builder } ) => builder === 'builder' ? null : 'select' ,
160+ type : ( prev , { builder } ) => ! ! argv . builder || builder === 'builder' ? null : 'select' ,
161161 name : 'theme' ,
162162 message : 'Select a theme for your project:' ,
163163 choices : themes
@@ -169,9 +169,22 @@ async function main() {
169169 } ,
170170 } )
171171
172- const { framework, ts, builder, publicKey } = response
172+ const { framework, ts, publicKey } = response
173+
174+ console . log ( projectName )
173175
174- const theme = builder === 'builder' ? 'tailwind' : response . theme
176+ /**
177+ * Variables
178+ */
179+ const isBuilder = ! ! argv . builder || response . builder === 'builder'
180+ const theme = isBuilder ? 'tailwind' : response . theme
181+ const isAstro = framework === 'astro'
182+ const isTs = await isTypescript ( process . cwd ( ) , framework , ts )
183+ const isTailwind = [ 'tailwind' , 'tailwind-material' ] . indexOf ( theme ) !== - 1 || isBuilder
184+ const isBootstrap = [ 'bootstrap' ] . indexOf ( theme ) !== - 1
185+ const isLaravel = framework === 'laravel'
186+ const sourcePath = path . join ( __dirname , '../' , 'templates' , isBuilder ? 'builder' : 'vueform' , framework , theme , isTs ? 'ts' : 'js' )
187+ const targetPath = path . join ( process . cwd ( ) , projectName )
175188
176189 if ( projectName && framework ) {
177190 const fw = getFramework ( framework )
@@ -217,17 +230,6 @@ async function main() {
217230 status ( '\nInstalling dependencies...' )
218231 await runCommand ( 'npm' , [ 'install' ] , 'install dependencies' )
219232
220- /**
221- * Variables
222- */
223- const isAstro = framework === 'astro'
224- const isTs = await isTypescript ( process . cwd ( ) , framework , ts )
225- const isBuilder = builder === 'builder'
226- const isTailwind = [ 'tailwind' , 'tailwind-material' ] . indexOf ( theme ) !== - 1 || isBuilder
227- const isBootstrap = [ 'bootstrap' ] . indexOf ( theme ) !== - 1
228- const isLaravel = framework === 'laravel'
229- const sourcePath = path . join ( __dirname , '../' , 'templates' , builder , framework , theme , isTs ? 'ts' : 'js' )
230- const targetPath = process . cwd ( )
231233
232234 /**
233235 * Install Tailwind
0 commit comments