You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Make sure `commandbox-boxlang` is a dependency to detect BoxLang projects
### Fixed
- Creation of `bx` classes when `--boxlang` is used was missing from handler creation
- App generation install tweaks to avoid path issues by @gpickin
- Fix on copying files starting with a dot, like `.babelrc` for vite support, which is ignored by default by git ignores.
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ColdBox CLI - AI Coding Instructions
2
2
3
-
This is a CommandBox module providing CLI commands for ColdBox framework development. It generates scaffolded code for handlers, models, views, tests, and complete applications with support for both CFML and BoxLang.
3
+
This is a CommandBox module (v7.10.0) providing CLI commands for ColdBox framework development. It generates scaffolded code for handlers, models, views, tests, and complete applications. **BoxLang is now the default language**for all new applications and generated code, with full CFML support available via the `--cfml` flag.
4
4
5
5
## Architecture & Key Components
6
6
@@ -16,6 +16,24 @@ This is a CommandBox module providing CLI commands for ColdBox framework develop
16
16
2. Package.json `testbox.runner` setting
17
17
3. Package.json `language` property
18
18
19
+
**Language Flags**:
20
+
-`--boxlang` - Force BoxLang generation (usually not needed as it's the default)
21
+
-`--cfml` - Force CFML generation (overrides BoxLang default)
22
+
23
+
**Application Creation Features**:
24
+
-`coldbox create app-wizard` - Interactive wizard for creating applications
25
+
-`--migrations` - Include database migrations support
26
+
-`--docker` - Include Docker configuration and containerization
27
+
-`--vite` - Include Vite frontend asset building (modern/BoxLang templates)
28
+
-`--rest` - Configure as REST API application (BoxLang templates)
29
+
30
+
**Code Style Conventions**:
31
+
-**Semicolons are optional** in CFML/BoxLang and should NOT be used in generated code except:
32
+
- When demarcating property declarations
33
+
- When required in inline component syntax
34
+
- Example: `property name="userService" inject="UserService";` (property with semicolon)
35
+
- Example: `var result = service.getData()` (no semicolon needed)
36
+
19
37
## Development Workflows
20
38
21
39
**Command Development**:
@@ -27,17 +45,20 @@ This is a CommandBox module providing CLI commands for ColdBox framework develop
27
45
- Templates use token replacement with `replaceNoCase(content, "|token|", value, "all")`
28
46
- BoxLang conversion uses `toBoxLangClass()` to transform `component` to `class`
29
47
- Resource generation supports both REST and standard handlers via template selection
48
+
- Modern templates (`boxlang`, `modern`) support additional features via flags: `--vite`, `--rest`, `--docker`, `--migrations`
49
+
- Default skeleton is now `boxlang` instead of `advanced`
30
50
31
51
**Module Dependencies**: The module lazy-loads `testbox-cli` and `commandbox-migrations` via utility methods `ensureTestBoxModule()` and `ensureMigrationsModule()` only when needed.
32
52
33
53
## Key Patterns & Conventions
34
54
35
55
**File Generation Logic**: Commands typically:
36
56
1. Resolve and validate paths using `resolvePath()`
37
-
2. Read appropriate templates based on `--rest`, `--boxlang` flags
57
+
2. Read appropriate templates based on `--rest`, `--boxlang`, `--cfml` flags
38
58
3. Perform token replacements for customization
39
59
4. Create directories if they don't exist
40
60
5. Generate additional files (views, tests) based on flags
61
+
6. For app creation: apply feature flags (`--vite`, `--docker`, `--migrations`) to configure project
41
62
42
63
**Cross-Component Integration**:
43
64
- Models can generate handlers via `--handler` flag
Copy file name to clipboardExpand all lines: templates/ai/flat-copilot-instructions.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# ColdBox Flat Template - AI Coding Instructions
2
2
3
-
This is a ColdBox HMVC framework template using the traditional "flat" structure where all application code lives in the webroot. Use CFML with ColdBox 7+ conventions. Compatible with Adobe ColdFusion 2018+, Lucee 5.x+, and BoxLang 1.0+.
3
+
This is a ColdBox HMVC framework template using the traditional "flat" structure where all application code lives in the webroot. **Supports both BoxLang (when specified) and CFML (default for flat template)** with ColdBox 7+ conventions. Compatible with Adobe ColdFusion 2018+, Lucee 5.x+, and BoxLang 1.0+.
4
+
5
+
**Note**: For new projects, consider using the BoxLang or Modern templates which are now the recommended defaults.
4
6
5
7
## 🏗️ Architecture Overview
6
8
@@ -43,10 +45,12 @@ This is a ColdBox HMVC framework template using the traditional "flat" structure
43
45
44
46
### Standard Handler Structure
45
47
48
+
**Code Style Note**: Semicolons are optional in CFML/BoxLang. Only use them when demarcating properties or in inline component syntax.
49
+
46
50
```cfml
47
51
component extends="coldbox.system.EventHandler" {
48
52
49
-
// Dependency injection
53
+
// Dependency injection (semicolons used to demarcate properties)
50
54
property name="userService" inject="UserService";
51
55
52
56
// All actions receive three arguments:
@@ -170,10 +174,13 @@ box run-script docker:run # Run container
170
174
box run-script docker:stack up # Start docker-compose stack
171
175
box run-script docker:stack down # Stop docker-compose stack
Copy file name to clipboardExpand all lines: templates/ai/modern-copilot-instructions.md
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# ColdBox Modern Template - AI Coding Instructions
2
2
3
-
This is a ColdBox HMVC framework template with a "modern" folder structure that separates application code from the public webroot. Use CFML/BoxLang with ColdBox 7+ conventions.
3
+
This is a ColdBox HMVC framework template with a "modern" folder structure that separates application code from the public webroot. **Supports both BoxLang (default) and CFML** with ColdBox 7+ conventions.
4
+
5
+
**Template Features**: This template supports Vite integration (`--vite`), Docker containerization (`--docker`), REST API configuration (`--rest`), and database migrations (`--migrations`).
4
6
5
7
## 🏗️ Architecture Overview
6
8
@@ -54,6 +56,8 @@ This template **requires** CommandBox aliases in `server.json` to expose interna
54
56
55
57
### Standard Handler Structure
56
58
59
+
**Code Style Note**: Semicolons are optional in CFML/BoxLang. Only use them when demarcating properties or in inline component syntax.
0 commit comments