@vc-shell/create-vc-app 1.2.4-beta.8 → 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.
- package/README.md +44 -74
- package/dist/commands/add-module.d.ts +2 -0
- package/dist/commands/add-module.d.ts.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/engine/codegen.d.ts +9 -0
- package/dist/engine/codegen.d.ts.map +1 -0
- package/dist/engine/helpers.d.ts +19 -0
- package/dist/engine/helpers.d.ts.map +1 -0
- package/dist/engine/template.d.ts +21 -0
- package/dist/engine/template.d.ts.map +1 -0
- package/dist/index.js +355 -526
- package/dist/output.d.ts +4 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/templates/dynamic-module/_gitignore +4 -0
- package/dist/templates/dynamic-module/_package.json.ejs +26 -0
- package/dist/templates/dynamic-module/src/modules/index.ts.ejs +5 -0
- package/dist/templates/dynamic-module/tsconfig.json +14 -0
- package/dist/templates/dynamic-module/vite.config.mts.ejs +3 -0
- package/dist/templates/{base/_env → host-app/_env.ejs} +1 -1
- package/dist/templates/{base/_package.json → host-app/_package.json.ejs} +7 -7
- package/dist/templates/{base/index.html → host-app/index.html.ejs} +1 -1
- package/dist/templates/{base/src/bootstrap.ts → host-app/src/bootstrap.ts.ejs} +6 -3
- package/dist/templates/{base/src/main.ts → host-app/src/main.ts.ejs} +7 -5
- package/dist/templates/{base/src/pages/App.vue → host-app/src/pages/App.vue.ejs} +1 -1
- package/dist/templates/host-app/src/pages/Platform.vue +19 -0
- package/dist/templates/host-app/src/router/routes.ts.ejs +107 -0
- package/dist/templates/host-app/vite.config.mts.ejs +7 -0
- package/dist/templates/module/composables/index.ts.ejs +2 -0
- package/dist/templates/module/composables/useDetails.ts.ejs +38 -0
- package/dist/templates/module/composables/useList.ts.ejs +43 -0
- package/dist/templates/module/locales/en.json.ejs +22 -0
- package/dist/templates/module/pages/details.vue.ejs +111 -0
- package/dist/templates/module/pages/index.ts.ejs +2 -0
- package/dist/templates/module/pages/list.vue.ejs +117 -0
- package/dist/templates/{sample/classic-module → sample-module}/pages/details.vue +2 -2
- package/dist/templates/{sample/classic-module → sample-module}/pages/list.vue +3 -3
- package/dist/templates/standalone/LICENSE +12 -0
- package/dist/templates/standalone/README.md +54 -0
- package/dist/templates/standalone/_browserslistrc +3 -0
- package/dist/templates/standalone/_commitlintrc.json +3 -0
- package/dist/templates/standalone/_editorconfig +22 -0
- package/dist/templates/standalone/_env.ejs +3 -0
- package/dist/templates/standalone/_env.local.ejs +1 -0
- package/dist/templates/standalone/_eslintignore +3 -0
- package/dist/templates/standalone/_eslintrc.js +41 -0
- package/dist/templates/standalone/_github/COMMIT_CONVENTION.md +91 -0
- package/dist/templates/standalone/_github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/dist/templates/standalone/_gitignore +71 -0
- package/dist/templates/standalone/_package.json.ejs +70 -0
- package/dist/templates/standalone/_prettierignore +4 -0
- package/dist/templates/standalone/_prettierrc +4 -0
- package/dist/templates/standalone/_vscode/extensions.json +14 -0
- package/dist/templates/standalone/_vscode/settings.json +14 -0
- package/dist/templates/standalone/_yarn/releases/yarn-4.9.1.cjs +948 -0
- package/dist/templates/standalone/_yarnrc.yml +7 -0
- package/dist/templates/standalone/index.html.ejs +26 -0
- package/dist/templates/standalone/postcss.config.cjs +6 -0
- package/dist/templates/standalone/public/assets/1.jpeg +0 -0
- package/dist/templates/standalone/public/assets/2.jpg +0 -0
- package/dist/templates/standalone/public/assets/3.jpg +0 -0
- package/dist/templates/standalone/public/assets/app-select.svg +11 -0
- package/dist/templates/standalone/public/assets/avatar.jpg +0 -0
- package/dist/templates/standalone/public/assets/background.jpg +0 -0
- package/dist/templates/standalone/public/assets/empty.png +0 -0
- package/dist/templates/standalone/public/assets/logo-white.svg +21 -0
- package/dist/templates/standalone/public/assets/logo.svg +8 -0
- package/dist/templates/standalone/public/assets/welcome.png +0 -0
- package/dist/templates/standalone/public/img/icons/apple-touch-icon.png +0 -0
- package/dist/templates/standalone/public/img/icons/favicon-16x16.png +0 -0
- package/dist/templates/standalone/public/img/icons/favicon-32x32.png +0 -0
- package/dist/templates/standalone/public/img/icons/favicon.ico +0 -0
- package/dist/templates/standalone/public/img/icons/mstile-150x150.png +0 -0
- package/dist/templates/standalone/public/img/icons/safari-pinned-tab.svg +32 -0
- package/dist/templates/standalone/src/api_client/README.md +199 -0
- package/dist/templates/standalone/src/bootstrap.ts.ejs +26 -0
- package/dist/templates/standalone/src/components/dashboard-widgets/Welcome.vue +51 -0
- package/dist/templates/standalone/src/composables/index.ts +1 -0
- package/dist/templates/standalone/src/env.d.ts +9 -0
- package/dist/templates/standalone/src/locales/en.json +16 -0
- package/dist/templates/standalone/src/locales/index.ts +2 -0
- package/dist/templates/{sample/overrides/main.ts → standalone/src/main.ts.ejs} +22 -9
- package/dist/templates/standalone/src/pages/App.vue.ejs +38 -0
- package/dist/templates/standalone/src/pages/Dashboard.vue.ejs +7 -0
- package/dist/templates/standalone/src/router/index.ts +10 -0
- package/dist/templates/{base/src/router/routes.ts → standalone/src/router/routes.ts.ejs} +27 -7
- package/dist/templates/standalone/src/shims-vue.d.ts +27 -0
- package/dist/templates/standalone/src/styles/custom.scss +116 -0
- package/dist/templates/standalone/src/styles/index.scss +8 -0
- package/dist/templates/standalone/src/vue-i18n.d.ts +10 -0
- package/dist/templates/standalone/tailwind.config.ts +7 -0
- package/dist/templates/standalone/tsconfig.json +16 -0
- package/dist/templates/standalone/yarn.lock +0 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +7 -4
- package/dist/templates/modules/classic-module/composables/index.ts +0 -2
- package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}Details/index.ts +0 -24
- package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}List/index.ts +0 -47
- package/dist/templates/modules/classic-module/locales/en.json +0 -37
- package/dist/templates/modules/classic-module/pages/details.vue +0 -87
- package/dist/templates/modules/classic-module/pages/list.vue +0 -257
- package/dist/templates/sample/classic-module/pages/index.ts +0 -2
- /package/dist/templates/{base → host-app}/LICENSE +0 -0
- /package/dist/templates/{base → host-app}/README.md +0 -0
- /package/dist/templates/{base → host-app}/_browserslistrc +0 -0
- /package/dist/templates/{base → host-app}/_commitlintrc.json +0 -0
- /package/dist/templates/{base → host-app}/_editorconfig +0 -0
- /package/dist/templates/{base/_env.local → host-app/_env.local.ejs} +0 -0
- /package/dist/templates/{base → host-app}/_eslintignore +0 -0
- /package/dist/templates/{base → host-app}/_eslintrc.js +0 -0
- /package/dist/templates/{base → host-app}/_github/COMMIT_CONVENTION.md +0 -0
- /package/dist/templates/{base → host-app}/_github/PULL_REQUEST_TEMPLATE.md +0 -0
- /package/dist/templates/{base → host-app}/_gitignore +0 -0
- /package/dist/templates/{base → host-app}/_prettierignore +0 -0
- /package/dist/templates/{base → host-app}/_prettierrc +0 -0
- /package/dist/templates/{base → host-app}/_vscode/extensions.json +0 -0
- /package/dist/templates/{base → host-app}/_vscode/settings.json +0 -0
- /package/dist/templates/{base → host-app}/_yarn/releases/yarn-4.9.1.cjs +0 -0
- /package/dist/templates/{base → host-app}/_yarnrc.yml +0 -0
- /package/dist/templates/{base → host-app}/postcss.config.cjs +0 -0
- /package/dist/templates/{base → host-app}/public/assets/1.jpeg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/2.jpg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/3.jpg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/app-select.svg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/avatar.jpg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/background.jpg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/empty.png +0 -0
- /package/dist/templates/{base → host-app}/public/assets/logo-white.svg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/logo.svg +0 -0
- /package/dist/templates/{base → host-app}/public/assets/welcome.png +0 -0
- /package/dist/templates/{base → host-app}/public/img/icons/apple-touch-icon.png +0 -0
- /package/dist/templates/{base → host-app}/public/img/icons/favicon-16x16.png +0 -0
- /package/dist/templates/{base → host-app}/public/img/icons/favicon-32x32.png +0 -0
- /package/dist/templates/{base → host-app}/public/img/icons/favicon.ico +0 -0
- /package/dist/templates/{base → host-app}/public/img/icons/mstile-150x150.png +0 -0
- /package/dist/templates/{base → host-app}/public/img/icons/safari-pinned-tab.svg +0 -0
- /package/dist/templates/{base → host-app}/src/api_client/README.md +0 -0
- /package/dist/templates/{base → host-app}/src/components/dashboard-widgets/Welcome.vue +0 -0
- /package/dist/templates/{base → host-app}/src/composables/index.ts +0 -0
- /package/dist/templates/{base → host-app}/src/env.d.ts +0 -0
- /package/dist/templates/{base → host-app}/src/locales/en.json +0 -0
- /package/dist/templates/{base → host-app}/src/locales/index.ts +0 -0
- /package/dist/templates/{base/src/pages/Dashboard.vue → host-app/src/pages/Dashboard.vue.ejs} +0 -0
- /package/dist/templates/{base → host-app}/src/router/index.ts +0 -0
- /package/dist/templates/{base → host-app}/src/shims-vue.d.ts +0 -0
- /package/dist/templates/{base → host-app}/src/styles/custom.scss +0 -0
- /package/dist/templates/{base → host-app}/src/styles/index.scss +0 -0
- /package/dist/templates/{base → host-app}/src/vue-i18n.d.ts +0 -0
- /package/dist/templates/{base → host-app}/tailwind.config.ts +0 -0
- /package/dist/templates/{base → host-app}/tsconfig.json +0 -0
- /package/dist/templates/{base → host-app}/yarn.lock +0 -0
- /package/dist/templates/{modules/classic-module/index.ts → module/index.ts.ejs} +0 -0
- /package/dist/templates/{modules/classic-module → module}/locales/index.ts +0 -0
- /package/dist/templates/{sample/classic-module → sample-module}/composables/index.ts +0 -0
- /package/dist/templates/{sample/classic-module → sample-module}/composables/useDetails/index.ts +0 -0
- /package/dist/templates/{sample/classic-module → sample-module}/composables/useList/index.ts +0 -0
- /package/dist/templates/{sample/classic-module → sample-module}/index.ts +0 -0
- /package/dist/templates/{sample/classic-module → sample-module}/locales/en.json +0 -0
- /package/dist/templates/{sample/classic-module → sample-module}/locales/index.ts +0 -0
- /package/dist/templates/{modules/classic-module → sample-module}/pages/index.ts +0 -0
- /package/dist/templates/{mocks → sample-module}/sample-data/constants.ts +0 -0
- /package/dist/templates/{mocks → sample-module}/sample-data/index.ts +0 -0
- /package/dist/templates/{mocks → sample-module}/sample-data/methods.ts +0 -0
- /package/dist/templates/{base/vite.config.mts → standalone/vite.config.mts.ejs} +0 -0
package/README.md
CHANGED
|
@@ -1,106 +1,76 @@
|
|
|
1
|
-
#
|
|
1
|
+
# create-vc-app
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Scaffolding tool for VC Shell applications and modules.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Create a New Project
|
|
6
6
|
|
|
7
|
-
Run following command:
|
|
8
7
|
```bash
|
|
9
|
-
|
|
8
|
+
npx create-vc-app [project-name]
|
|
10
9
|
```
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
Interactive prompts guide you through project setup. Three project types are available:
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
19
|
+
### Non-Interactive Mode
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
```
|
|
21
|
+
Pass flags to skip prompts:
|
|
26
22
|
|
|
27
|
-
|
|
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
|
-
|
|
27
|
+
# Dynamic module
|
|
28
|
+
npx create-vc-app my-module --type dynamic-module --module-name "Reviews"
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
###
|
|
34
|
+
### Options
|
|
36
35
|
|
|
37
36
|
| Option | Description | Default |
|
|
38
37
|
|--------|-------------|---------|
|
|
39
|
-
| `--
|
|
40
|
-
| `--
|
|
41
|
-
| `--
|
|
42
|
-
| `--module-name` |
|
|
43
|
-
| `--base-path` | Base path for the application | `/apps/<
|
|
44
|
-
| `--
|
|
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
|
|
47
|
-
| `--version`, `-v` | Show version |
|
|
48
|
+
| `--help`, `-h` | Show help | — |
|
|
49
|
+
| `--version`, `-v` | Show version | — |
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
## Add a Module to Existing Project
|
|
50
52
|
|
|
51
|
-
|
|
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
|
|
56
|
+
npx create-vc-app add-module <module-name>
|
|
59
57
|
```
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
69
|
+
cd <project-name>
|
|
70
|
+
yarn install
|
|
71
|
+
yarn serve
|
|
94
72
|
```
|
|
95
73
|
|
|
96
|
-
##
|
|
97
|
-
|
|
98
|
-
- **classic** - Classic view modules boilerplate (default)
|
|
99
|
-
- **dynamic** - Dynamic view modules boilerplate (coming soon)
|
|
100
|
-
|
|
101
|
-
## Notes
|
|
74
|
+
## Documentation
|
|
102
75
|
|
|
103
|
-
-
|
|
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 @@
|
|
|
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 @@
|
|
|
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"}
|