Skip to content

Commit 0c60a2e

Browse files
committed
- More Modern CFML template support
1 parent 0e442a0 commit 0c60a2e

File tree

3 files changed

+51
-7
lines changed

3 files changed

+51
-7
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
### Added
13+
14+
- More Modern CFML template support
15+
1216
## [8.2.0] - 2025-11-11
1317

1418
### Added

commands/coldbox/create/app.cfc

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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" )

templates/vite/layouts/Main.cfm

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<cfoutput>
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<title>Welcome to Coldbox!</title>
9+
10+
<meta name="description" content="ColdBox Application Template">
11+
<meta name="author" content="Ortus Solutions, Corp">
12+
13+
<!---Base URL --->
14+
<base href="#event.getHTMLBaseURL()#" />
15+
<!--- Vite Assets --->
16+
#vite( [ "resources/assets/css/app.css", "resources/assets/js/app.js" ] )#
17+
</head>
18+
<body>
19+
<div id="app">
20+
<!--- Vue App --->
21+
<Hello />
22+
</div>
23+
</body>
24+
</html>
25+
</cfoutput>

0 commit comments

Comments
 (0)