@@ -171,11 +171,11 @@ component extends="coldbox-cli.models.BaseCommand" {
171171 // Prepare defaults on box.json so we remove template based ones
172172 command ( " package set" )
173173 .params (
174- name : arguments .name ,
175- slug : variables .formatterUtil .slugify ( arguments .name ),
176- version : " 1.0.0" ,
177- location : " forgeboxStorage" ,
178- ignore : " []" ,
174+ name : arguments .name ,
175+ slug : variables .formatterUtil .slugify ( arguments .name ),
176+ version : " 1.0.0" ,
177+ location : " forgeboxStorage" ,
178+ ignore : " []" ,
179179 description : " A ColdBox Application created with the ColdBox CLI"
180180 )
181181 .run ();
@@ -290,14 +290,29 @@ component extends="coldbox-cli.models.BaseCommand" {
290290 " #variables .settings .templatesPath #/vite/vite.config.mjs" ,
291291 arguments .directory & " vite.config.mjs"
292292 )
293- fileDelete ( arguments .directory & " app/layouts/Main.bxm" )
294- fileCopy (
295- " #variables .settings .templatesPath #/vite/layouts/Main.bxm" ,
296- arguments .directory & " app/layouts/Main.bxm"
297- )
298- fileCopy (
293+
294+ // BoxLang Layout
295+ if ( fileExists ( arguments .directory & " app/layouts/Main.bxm" ) ) {
296+ fileDelete ( arguments .directory & " app/layouts/Main.bxm" )
297+ fileCopy (
298+ " #variables .settings .templatesPath #/vite/layouts/Main.bxm" ,
299+ arguments .directory & " app/layouts/Main.bxm"
300+ )
301+ }
302+
303+ // CFML Layout
304+ if ( fileExists ( arguments .directory & " app/layouts/Main.cfm" ) ) {
305+ fileDelete ( arguments .directory & " app/layouts/Main.cfm" )
306+ fileCopy (
307+ " #variables .settings .templatesPath #/vite/layouts/Main.cfm" ,
308+ arguments .directory & " app/layouts/Main.cfm"
309+ )
310+ }
311+
312+ directoryCopy (
299313 " #variables .settings .templatesPath #/vite/assets" ,
300- arguments .directory & " resources/assets"
314+ arguments .directory & " resources/assets" ,
315+ true
301316 )
302317
303318 printInfo ( " 🥊 Installing ColdBox Vite Helpers" )
0 commit comments