@vc-shell/create-vc-app 1.2.4-beta.7 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +44 -74
  2. package/dist/commands/add-module.d.ts +2 -0
  3. package/dist/commands/add-module.d.ts.map +1 -0
  4. package/dist/commands/init.d.ts +2 -0
  5. package/dist/commands/init.d.ts.map +1 -0
  6. package/dist/engine/codegen.d.ts +9 -0
  7. package/dist/engine/codegen.d.ts.map +1 -0
  8. package/dist/engine/helpers.d.ts +19 -0
  9. package/dist/engine/helpers.d.ts.map +1 -0
  10. package/dist/engine/template.d.ts +21 -0
  11. package/dist/engine/template.d.ts.map +1 -0
  12. package/dist/index.js +355 -526
  13. package/dist/output.d.ts +4 -0
  14. package/dist/output.d.ts.map +1 -0
  15. package/dist/templates/dynamic-module/_gitignore +4 -0
  16. package/dist/templates/dynamic-module/_package.json.ejs +26 -0
  17. package/dist/templates/dynamic-module/src/modules/index.ts.ejs +5 -0
  18. package/dist/templates/dynamic-module/tsconfig.json +14 -0
  19. package/dist/templates/dynamic-module/vite.config.mts.ejs +3 -0
  20. package/dist/templates/{base/_env → host-app/_env.ejs} +1 -1
  21. package/dist/templates/{base/_package.json → host-app/_package.json.ejs} +7 -7
  22. package/dist/templates/{base/index.html → host-app/index.html.ejs} +1 -1
  23. package/dist/templates/{base/src/bootstrap.ts → host-app/src/bootstrap.ts.ejs} +6 -3
  24. package/dist/templates/{base/src/main.ts → host-app/src/main.ts.ejs} +7 -5
  25. package/dist/templates/{base/src/pages/App.vue → host-app/src/pages/App.vue.ejs} +1 -1
  26. package/dist/templates/host-app/src/pages/Platform.vue +19 -0
  27. package/dist/templates/host-app/src/router/routes.ts.ejs +107 -0
  28. package/dist/templates/host-app/vite.config.mts.ejs +7 -0
  29. package/dist/templates/module/composables/index.ts.ejs +2 -0
  30. package/dist/templates/module/composables/useDetails.ts.ejs +38 -0
  31. package/dist/templates/module/composables/useList.ts.ejs +43 -0
  32. package/dist/templates/module/locales/en.json.ejs +22 -0
  33. package/dist/templates/module/pages/details.vue.ejs +111 -0
  34. package/dist/templates/module/pages/index.ts.ejs +2 -0
  35. package/dist/templates/module/pages/list.vue.ejs +117 -0
  36. package/dist/templates/{sample/classic-module → sample-module}/pages/details.vue +2 -2
  37. package/dist/templates/{sample/classic-module → sample-module}/pages/list.vue +3 -3
  38. package/dist/templates/standalone/LICENSE +12 -0
  39. package/dist/templates/standalone/README.md +54 -0
  40. package/dist/templates/standalone/_browserslistrc +3 -0
  41. package/dist/templates/standalone/_commitlintrc.json +3 -0
  42. package/dist/templates/standalone/_editorconfig +22 -0
  43. package/dist/templates/standalone/_env.ejs +3 -0
  44. package/dist/templates/standalone/_env.local.ejs +1 -0
  45. package/dist/templates/standalone/_eslintignore +3 -0
  46. package/dist/templates/standalone/_eslintrc.js +41 -0
  47. package/dist/templates/standalone/_github/COMMIT_CONVENTION.md +91 -0
  48. package/dist/templates/standalone/_github/PULL_REQUEST_TEMPLATE.md +8 -0
  49. package/dist/templates/standalone/_gitignore +71 -0
  50. package/dist/templates/standalone/_package.json.ejs +70 -0
  51. package/dist/templates/standalone/_prettierignore +4 -0
  52. package/dist/templates/standalone/_prettierrc +4 -0
  53. package/dist/templates/standalone/_vscode/extensions.json +14 -0
  54. package/dist/templates/standalone/_vscode/settings.json +14 -0
  55. package/dist/templates/standalone/_yarn/releases/yarn-4.9.1.cjs +948 -0
  56. package/dist/templates/standalone/_yarnrc.yml +7 -0
  57. package/dist/templates/standalone/index.html.ejs +26 -0
  58. package/dist/templates/standalone/postcss.config.cjs +6 -0
  59. package/dist/templates/standalone/public/assets/1.jpeg +0 -0
  60. package/dist/templates/standalone/public/assets/2.jpg +0 -0
  61. package/dist/templates/standalone/public/assets/3.jpg +0 -0
  62. package/dist/templates/standalone/public/assets/app-select.svg +11 -0
  63. package/dist/templates/standalone/public/assets/avatar.jpg +0 -0
  64. package/dist/templates/standalone/public/assets/background.jpg +0 -0
  65. package/dist/templates/standalone/public/assets/empty.png +0 -0
  66. package/dist/templates/standalone/public/assets/logo-white.svg +21 -0
  67. package/dist/templates/standalone/public/assets/logo.svg +8 -0
  68. package/dist/templates/standalone/public/assets/welcome.png +0 -0
  69. package/dist/templates/standalone/public/img/icons/apple-touch-icon.png +0 -0
  70. package/dist/templates/standalone/public/img/icons/favicon-16x16.png +0 -0
  71. package/dist/templates/standalone/public/img/icons/favicon-32x32.png +0 -0
  72. package/dist/templates/standalone/public/img/icons/favicon.ico +0 -0
  73. package/dist/templates/standalone/public/img/icons/mstile-150x150.png +0 -0
  74. package/dist/templates/standalone/public/img/icons/safari-pinned-tab.svg +32 -0
  75. package/dist/templates/standalone/src/api_client/README.md +199 -0
  76. package/dist/templates/standalone/src/bootstrap.ts.ejs +26 -0
  77. package/dist/templates/standalone/src/components/dashboard-widgets/Welcome.vue +51 -0
  78. package/dist/templates/standalone/src/composables/index.ts +1 -0
  79. package/dist/templates/standalone/src/env.d.ts +9 -0
  80. package/dist/templates/standalone/src/locales/en.json +16 -0
  81. package/dist/templates/standalone/src/locales/index.ts +2 -0
  82. package/dist/templates/{sample/overrides/main.ts → standalone/src/main.ts.ejs} +22 -9
  83. package/dist/templates/standalone/src/pages/App.vue.ejs +38 -0
  84. package/dist/templates/standalone/src/pages/Dashboard.vue.ejs +7 -0
  85. package/dist/templates/standalone/src/router/index.ts +10 -0
  86. package/dist/templates/{base/src/router/routes.ts → standalone/src/router/routes.ts.ejs} +27 -7
  87. package/dist/templates/standalone/src/shims-vue.d.ts +27 -0
  88. package/dist/templates/standalone/src/styles/custom.scss +116 -0
  89. package/dist/templates/standalone/src/styles/index.scss +8 -0
  90. package/dist/templates/standalone/src/vue-i18n.d.ts +10 -0
  91. package/dist/templates/standalone/tailwind.config.ts +7 -0
  92. package/dist/templates/standalone/tsconfig.json +16 -0
  93. package/dist/templates/standalone/yarn.lock +0 -0
  94. package/dist/types.d.ts +23 -0
  95. package/dist/types.d.ts.map +1 -0
  96. package/package.json +7 -4
  97. package/dist/templates/modules/classic-module/composables/index.ts +0 -2
  98. package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}Details/index.ts +0 -24
  99. package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}List/index.ts +0 -47
  100. package/dist/templates/modules/classic-module/locales/en.json +0 -37
  101. package/dist/templates/modules/classic-module/pages/details.vue +0 -87
  102. package/dist/templates/modules/classic-module/pages/list.vue +0 -257
  103. package/dist/templates/sample/classic-module/pages/index.ts +0 -2
  104. /package/dist/templates/{base → host-app}/LICENSE +0 -0
  105. /package/dist/templates/{base → host-app}/README.md +0 -0
  106. /package/dist/templates/{base → host-app}/_browserslistrc +0 -0
  107. /package/dist/templates/{base → host-app}/_commitlintrc.json +0 -0
  108. /package/dist/templates/{base → host-app}/_editorconfig +0 -0
  109. /package/dist/templates/{base/_env.local → host-app/_env.local.ejs} +0 -0
  110. /package/dist/templates/{base → host-app}/_eslintignore +0 -0
  111. /package/dist/templates/{base → host-app}/_eslintrc.js +0 -0
  112. /package/dist/templates/{base → host-app}/_github/COMMIT_CONVENTION.md +0 -0
  113. /package/dist/templates/{base → host-app}/_github/PULL_REQUEST_TEMPLATE.md +0 -0
  114. /package/dist/templates/{base → host-app}/_gitignore +0 -0
  115. /package/dist/templates/{base → host-app}/_prettierignore +0 -0
  116. /package/dist/templates/{base → host-app}/_prettierrc +0 -0
  117. /package/dist/templates/{base → host-app}/_vscode/extensions.json +0 -0
  118. /package/dist/templates/{base → host-app}/_vscode/settings.json +0 -0
  119. /package/dist/templates/{base → host-app}/_yarn/releases/yarn-4.9.1.cjs +0 -0
  120. /package/dist/templates/{base → host-app}/_yarnrc.yml +0 -0
  121. /package/dist/templates/{base → host-app}/postcss.config.cjs +0 -0
  122. /package/dist/templates/{base → host-app}/public/assets/1.jpeg +0 -0
  123. /package/dist/templates/{base → host-app}/public/assets/2.jpg +0 -0
  124. /package/dist/templates/{base → host-app}/public/assets/3.jpg +0 -0
  125. /package/dist/templates/{base → host-app}/public/assets/app-select.svg +0 -0
  126. /package/dist/templates/{base → host-app}/public/assets/avatar.jpg +0 -0
  127. /package/dist/templates/{base → host-app}/public/assets/background.jpg +0 -0
  128. /package/dist/templates/{base → host-app}/public/assets/empty.png +0 -0
  129. /package/dist/templates/{base → host-app}/public/assets/logo-white.svg +0 -0
  130. /package/dist/templates/{base → host-app}/public/assets/logo.svg +0 -0
  131. /package/dist/templates/{base → host-app}/public/assets/welcome.png +0 -0
  132. /package/dist/templates/{base → host-app}/public/img/icons/apple-touch-icon.png +0 -0
  133. /package/dist/templates/{base → host-app}/public/img/icons/favicon-16x16.png +0 -0
  134. /package/dist/templates/{base → host-app}/public/img/icons/favicon-32x32.png +0 -0
  135. /package/dist/templates/{base → host-app}/public/img/icons/favicon.ico +0 -0
  136. /package/dist/templates/{base → host-app}/public/img/icons/mstile-150x150.png +0 -0
  137. /package/dist/templates/{base → host-app}/public/img/icons/safari-pinned-tab.svg +0 -0
  138. /package/dist/templates/{base → host-app}/src/api_client/README.md +0 -0
  139. /package/dist/templates/{base → host-app}/src/components/dashboard-widgets/Welcome.vue +0 -0
  140. /package/dist/templates/{base → host-app}/src/composables/index.ts +0 -0
  141. /package/dist/templates/{base → host-app}/src/env.d.ts +0 -0
  142. /package/dist/templates/{base → host-app}/src/locales/en.json +0 -0
  143. /package/dist/templates/{base → host-app}/src/locales/index.ts +0 -0
  144. /package/dist/templates/{base/src/pages/Dashboard.vue → host-app/src/pages/Dashboard.vue.ejs} +0 -0
  145. /package/dist/templates/{base → host-app}/src/router/index.ts +0 -0
  146. /package/dist/templates/{base → host-app}/src/shims-vue.d.ts +0 -0
  147. /package/dist/templates/{base → host-app}/src/styles/custom.scss +0 -0
  148. /package/dist/templates/{base → host-app}/src/styles/index.scss +0 -0
  149. /package/dist/templates/{base → host-app}/src/vue-i18n.d.ts +0 -0
  150. /package/dist/templates/{base → host-app}/tailwind.config.ts +0 -0
  151. /package/dist/templates/{base → host-app}/tsconfig.json +0 -0
  152. /package/dist/templates/{base → host-app}/yarn.lock +0 -0
  153. /package/dist/templates/{modules/classic-module/index.ts → module/index.ts.ejs} +0 -0
  154. /package/dist/templates/{modules/classic-module → module}/locales/index.ts +0 -0
  155. /package/dist/templates/{sample/classic-module → sample-module}/composables/index.ts +0 -0
  156. /package/dist/templates/{sample/classic-module → sample-module}/composables/useDetails/index.ts +0 -0
  157. /package/dist/templates/{sample/classic-module → sample-module}/composables/useList/index.ts +0 -0
  158. /package/dist/templates/{sample/classic-module → sample-module}/index.ts +0 -0
  159. /package/dist/templates/{sample/classic-module → sample-module}/locales/en.json +0 -0
  160. /package/dist/templates/{sample/classic-module → sample-module}/locales/index.ts +0 -0
  161. /package/dist/templates/{modules/classic-module → sample-module}/pages/index.ts +0 -0
  162. /package/dist/templates/{mocks → sample-module}/sample-data/constants.ts +0 -0
  163. /package/dist/templates/{mocks → sample-module}/sample-data/index.ts +0 -0
  164. /package/dist/templates/{mocks → sample-module}/sample-data/methods.ts +0 -0
  165. /package/dist/templates/{base/vite.config.mts → standalone/vite.config.mts.ejs} +0 -0
package/README.md CHANGED
@@ -1,106 +1,76 @@
1
- # Creating your first application
1
+ # create-vc-app
2
2
 
3
- Make sure you have executed `yarn` command and your current working directory is the one where you intend to create a project.
3
+ Scaffolding tool for VC Shell applications and modules.
4
4
 
5
- ## Interactive Mode (Default)
5
+ ## Create a New Project
6
6
 
7
- Run following command:
8
7
  ```bash
9
- $ npx create-vc-app
8
+ npx create-vc-app [project-name]
10
9
  ```
11
10
 
12
- This command will execute application scaffolding tool. You will be presented with prompts:
11
+ Interactive prompts guide you through project setup. Three project types are available:
13
12
 
14
- ```text
15
- ✔ Project name: … <your-app-name>
16
- Package name: <your-package-name>
17
- Base path: /apps/<your-app-name>/
18
- Select module variant: Classic view modules boilerplate
19
- ✔ Module name: … <your-first-module-name>
20
- ✔ Do you want to include additional module with sample data? … No / Yes
13
+ | Type | Description |
14
+ |------|-------------|
15
+ | **Standalone App** | Full application with bundled modules |
16
+ | **Dynamic Module** | Remote module loaded by host via Module Federation |
17
+ | **Host App** | Shell that loads dynamic modules at runtime |
21
18
 
22
- Scaffolding app in ./<your-app-name>...
19
+ ### Non-Interactive Mode
23
20
 
24
- Done.
25
- ```
21
+ Pass flags to skip prompts:
26
22
 
27
- ## Non-Interactive Mode
23
+ ```bash
24
+ # Standalone app with dashboard and sample data
25
+ npx create-vc-app my-app --type standalone --module-name "Products" --dashboard --mocks
28
26
 
29
- For automation, CI/CD, or when you want to skip prompts, you can use command line arguments:
27
+ # Dynamic module
28
+ npx create-vc-app my-module --type dynamic-module --module-name "Reviews"
30
29
 
31
- ```bash
32
- $ npx create-vc-app my-app --variant classic --module-name "My Module" --mocks
30
+ # Host app with tenant routing and AI agent
31
+ npx create-vc-app my-shell --type host-app --dashboard --tenant-routes --ai-agent
33
32
  ```
34
33
 
35
- ### Available Options
34
+ ### Options
36
35
 
37
36
  | Option | Description | Default |
38
37
  |--------|-------------|---------|
39
- | `--name`, `--app-name` | Name of the application | Directory name |
40
- | `--package-name` | Package name | App name (validated) |
41
- | `--variant` | Module variant (classic\|dynamic) | `classic` |
42
- | `--module-name` | Module name | App name in title case |
43
- | `--base-path` | Base path for the application | `/apps/<app-name>/` |
44
- | `--mocks` | Include additional module with sample data | `false` |
38
+ | `--type <type>` | Project type: `standalone` \| `dynamic-module` \| `host-app` | _(prompted)_ |
39
+ | `--name`, `--app-name` | Application name | Directory name |
40
+ | `--package-name` | npm package name | App name (validated) |
41
+ | `--module-name` | Initial module name | App name in title case |
42
+ | `--base-path` | Base path for the application | `/apps/<name>/` |
43
+ | `--tenant-routes` | Include tenant routing (`/:tenantId` prefix) | `false` |
44
+ | `--ai-agent` | Include AI Agent configuration | `false` |
45
+ | `--dashboard` | Include Dashboard with widgets | `false` |
46
+ | `--mocks` | Include sample module with mock data | `false` |
45
47
  | `--overwrite` | Overwrite existing files without confirmation | `false` |
46
- | `--help`, `-h` | Show help message | - |
47
- | `--version`, `-v` | Show version | - |
48
+ | `--help`, `-h` | Show help | |
49
+ | `--version`, `-v` | Show version | |
48
50
 
49
- ### Examples
51
+ ## Add a Module to Existing Project
50
52
 
51
- **Basic usage:**
52
- ```bash
53
- npx create-vc-app my-app
54
- ```
53
+ From your project root:
55
54
 
56
- **With custom options:**
57
55
  ```bash
58
- npx create-vc-app my-app --variant classic --module-name "My Module" --mocks
56
+ npx create-vc-app add-module <module-name>
59
57
  ```
60
58
 
61
- **With custom paths:**
62
- ```bash
63
- npx create-vc-app my-app --base-path "/custom/path/" --package-name "@my-org/my-app"
64
- ```
59
+ This will:
60
+ 1. Create `src/modules/<module-name>/` with list + details pages
61
+ 2. Update `src/main.ts` add import and `app.use()`
62
+ 3. Update `src/bootstrap.ts` — add menu item
65
63
 
66
- **Overwrite existing directory:**
67
- ```bash
68
- npx create-vc-app existing-dir --overwrite
69
- ```
70
-
71
- **Create in current directory:**
72
- ```bash
73
- npx create-vc-app . --name my-existing-project --overwrite
74
- ```
75
-
76
- **Full non-interactive example:**
77
- ```bash
78
- npx create-vc-app my-ecommerce-app \
79
- --variant classic \
80
- --module-name "Product Catalog" \
81
- --base-path "/apps/ecommerce/" \
82
- --package-name "@mycompany/ecommerce-app" \
83
- --mocks \
84
- --overwrite
85
- ```
64
+ If `main.ts` or `bootstrap.ts` can't be parsed automatically, manual instructions are printed.
86
65
 
87
66
  ## After Creation
88
67
 
89
- Once app is created, follow the instructions to install dependencies and start dev server:
90
68
  ```bash
91
- $ cd <your-app-name>
92
- $ yarn
93
- $ yarn serve
69
+ cd <project-name>
70
+ yarn install
71
+ yarn serve
94
72
  ```
95
73
 
96
- ## Available Variants
97
-
98
- - **classic** - Classic view modules boilerplate (default)
99
- - **dynamic** - Dynamic view modules boilerplate (coming soon)
100
-
101
- ## Notes
74
+ ## Documentation
102
75
 
103
- - If you provide a project name as the first argument, it will be used as the app name
104
- - The `--variant` option is required for non-interactive mode
105
- - Use `--overwrite` to automatically overwrite existing files without confirmation
106
- - Package names are automatically validated and converted to valid npm package names
76
+ https://docs.virtocommerce.org/platform/developer-guide/latest/custom-apps-development/vc-shell/vc-shell-overview/
@@ -0,0 +1,2 @@
1
+ export declare function addModuleCommand(args: Record<string, unknown>, templateRoot: string): Promise<void>;
2
+ //# sourceMappingURL=add-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-module.d.ts","sourceRoot":"","sources":["../../src/commands/add-module.ts"],"names":[],"mappings":"AAQA,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgFzG"}
@@ -0,0 +1,2 @@
1
+ export declare function initCommand(args: Record<string, unknown>, templateRoot: string): Promise<void>;
2
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAsBA,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+LpG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Add a module import and app.use() call to main.ts
3
+ */
4
+ export declare function addModuleToMain(mainTsPath: string, moduleName: string): void;
5
+ /**
6
+ * Add a menu item registration to bootstrap.ts
7
+ */
8
+ export declare function addMenuItemToBootstrap(bootstrapPath: string, moduleName: string): void;
9
+ //# sourceMappingURL=codegen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/engine/codegen.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAuB5E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,IAAI,CAsCN"}
@@ -0,0 +1,19 @@
1
+ export declare function toKebabCase(str: string): string;
2
+ export declare function toPascalCase(str: string): string;
3
+ export declare function toCamelCase(str: string): string;
4
+ export declare function toScreamingSnakeCase(str: string): string;
5
+ export declare function toSentenceCase(str: string): string;
6
+ export declare function isValidPackageName(name: string): boolean;
7
+ export declare function toValidPackageName(name: string): string;
8
+ export declare function toValidBasePath(basePath: string): string;
9
+ export declare function buildTemplateData(options: {
10
+ moduleName: string;
11
+ projectName?: string;
12
+ packageName?: string;
13
+ basePath?: string;
14
+ tenantRoutes?: boolean;
15
+ aiAgent?: boolean;
16
+ dashboard?: boolean;
17
+ mocks?: boolean;
18
+ }): Record<string, string | boolean>;
19
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/engine/helpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOxD;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAC9K,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CA4BlC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Render a single template file. Strips .ejs extension.
3
+ * Binary files are copied as-is. Text files are rendered through EJS.
4
+ */
5
+ export declare function renderTemplate(templatePath: string, outputPath: string, data: Record<string, unknown>): void;
6
+ /**
7
+ * Recursively render all files in a template directory to an output directory.
8
+ * Handles file renames (underscore → dot prefix) and EJS variable substitution
9
+ * in file/directory names.
10
+ */
11
+ export declare function renderDir(templateDir: string, outputDir: string, data: Record<string, unknown>): void;
12
+ /**
13
+ * Empty a directory (remove all contents but keep the dir itself).
14
+ * Preserves .git directory.
15
+ */
16
+ export declare function emptyDir(dir: string): void;
17
+ /**
18
+ * Check if a directory is empty (or only has .git)
19
+ */
20
+ export declare function isDirEmpty(dirPath: string): boolean;
21
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/engine/template.ts"],"names":[],"mappings":"AAwBA;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,IAAI,CAmBN;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,IAAI,CA6BN;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAY1C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAInD"}