diff --git a/cli/create-vc-app/README.md b/cli/create-vc-app/README.md index b88a65b87..3683eb633 100644 --- a/cli/create-vc-app/README.md +++ b/cli/create-vc-app/README.md @@ -5,16 +5,15 @@ Scaffolding tool for VC Shell applications and modules. ## Create a New Project ```bash -npx create-vc-app [project-name] +npx @vc-shell/create-vc-app [project-name] ``` -Interactive prompts guide you through project setup. Three project types are available: +Interactive prompts guide you through project setup. Two project types are available: | Type | Description | | ------------------ | -------------------------------------------------- | | **Standalone App** | Full application with bundled modules | | **Dynamic Module** | Remote module loaded by host via Module Federation | -| **Host App** | Shell that loads dynamic modules at runtime | ### Non-Interactive Mode @@ -22,38 +21,35 @@ Pass flags to skip prompts: ```bash # Standalone app with dashboard and sample data -npx create-vc-app my-app --type standalone --module-name "Products" --dashboard --mocks +npx @vc-shell/create-vc-app my-app --type standalone --module-name "Products" --dashboard --mocks # Dynamic module -npx create-vc-app my-module --type dynamic-module --module-name "Reviews" - -# Host app with tenant routing and AI agent -npx create-vc-app my-shell --type host-app --dashboard --tenant-routes --ai-agent +npx @vc-shell/create-vc-app my-module --type dynamic-module --module-name "Reviews" ``` ### Options -| Option | Description | Default | -| ---------------------- | ------------------------------------------------------------ | ---------------------- | -| `--type ` | Project type: `standalone` \| `dynamic-module` \| `host-app` | _(prompted)_ | -| `--name`, `--app-name` | Application name | Directory name | -| `--package-name` | npm package name | App name (validated) | -| `--module-name` | Initial module name | App name in title case | -| `--base-path` | Base path for the application | `/apps//` | -| `--tenant-routes` | Include tenant routing (`/:tenantId` prefix) | `false` | -| `--ai-agent` | Include AI Agent configuration | `false` | -| `--dashboard` | Include Dashboard with widgets | `false` | -| `--mocks` | Include sample module with mock data | `false` | -| `--overwrite` | Overwrite existing files without confirmation | `false` | -| `--help`, `-h` | Show help | — | -| `--version`, `-v` | Show version | — | +| Option | Description | Default | +| ---------------------- | ------------------------------------------------ | ---------------------- | +| `--type ` | Project type: `standalone` \| `dynamic-module` ` | _(prompted)_ | +| `--name`, `--app-name` | Application name | Directory name | +| `--package-name` | npm package name | App name (validated) | +| `--module-name` | Initial module name | App name in title case | +| `--base-path` | Base path for the application | `/apps//` | +| `--tenant-routes` | Include tenant routing (`/:tenantId` prefix) | `false` | +| `--ai-agent` | Include AI Agent configuration | `false` | +| `--dashboard` | Include Dashboard with widgets | `false` | +| `--mocks` | Include sample module with mock data | `false` | +| `--overwrite` | Overwrite existing files without confirmation | `false` | +| `--help`, `-h` | Show help | — | +| `--version`, `-v` | Show version | — | ## Add a Module to Existing Project From your project root: ```bash -npx create-vc-app add-module +npx @vc-shell/create-vc-app add-module ``` This will: diff --git a/cli/create-vc-app/src/commands/add-module.ts b/cli/create-vc-app/src/commands/add-module.ts index d01f95353..e6d906b05 100644 --- a/cli/create-vc-app/src/commands/add-module.ts +++ b/cli/create-vc-app/src/commands/add-module.ts @@ -5,10 +5,11 @@ import fs from "node:fs"; import { toKebabCase, toPascalCase, toSentenceCase, buildTemplateData } from "../engine/helpers.js"; import { renderDir } from "../engine/template.js"; import { addModuleToMain, addMenuItemToBootstrap } from "../engine/codegen.js"; +import type { CLIArgs } from "../types.js"; -export async function addModuleCommand(args: Record, templateRoot: string): Promise { +export async function addModuleCommand(args: CLIArgs, templateRoot: string): Promise { const cwd = process.cwd(); - const argModuleName = (args._ as string[])?.[1]; + const argModuleName = args._?.[1]; // Validate: is this a vc-shell project? const pkgPath = path.join(cwd, "package.json"); diff --git a/cli/create-vc-app/src/commands/init.test.ts b/cli/create-vc-app/src/commands/init.test.ts index 5d2726f2c..8433efa5b 100644 --- a/cli/create-vc-app/src/commands/init.test.ts +++ b/cli/create-vc-app/src/commands/init.test.ts @@ -31,10 +31,7 @@ describe("initCommand — standalone", () => { it("generates without module when --module-name is not provided", async () => { const _projectName = path.basename(root); - await initCommand( - { _: [root], type: "standalone", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", overwrite: true }, templateRoot); const mainTs = readGenerated(root, "src/main.ts"); @@ -53,10 +50,7 @@ describe("initCommand — standalone", () => { }); it("generates with module when --module-name is provided", async () => { - await initCommand( - { _: [root], type: "standalone", "module-name": "Orders", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", "module-name": "Orders", overwrite: true }, templateRoot); const mainTs = readGenerated(root, "src/main.ts"); @@ -74,10 +68,7 @@ describe("initCommand — standalone", () => { }); it("generates with mocks when --mocks is provided", async () => { - await initCommand( - { _: [root], type: "standalone", mocks: true, overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", mocks: true, overwrite: true }, templateRoot); const mainTs = readGenerated(root, "src/main.ts"); @@ -94,10 +85,7 @@ describe("initCommand — standalone", () => { it("generates with both module and mocks", async () => { await initCommand( - { _: [root], type: "standalone", "module-name": "Reviews", mocks: true, overwrite: true } as unknown as Record< - string, - unknown - >, + { _: [root], type: "standalone", "module-name": "Reviews", mocks: true, overwrite: true }, templateRoot, ); @@ -113,10 +101,7 @@ describe("initCommand — standalone", () => { }); it("includes dashboard when --dashboard is set", async () => { - await initCommand( - { _: [root], type: "standalone", dashboard: true, overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", dashboard: true, overwrite: true }, templateRoot); const bootstrap = readGenerated(root, "src/bootstrap.ts"); @@ -126,10 +111,7 @@ describe("initCommand — standalone", () => { }); it("excludes dashboard by default in non-interactive mode", async () => { - await initCommand( - { _: [root], type: "standalone", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", overwrite: true }, templateRoot); const bootstrap = readGenerated(root, "src/bootstrap.ts"); @@ -138,10 +120,7 @@ describe("initCommand — standalone", () => { }); it("includes AI agent config when --ai-agent is set", async () => { - await initCommand( - { _: [root], type: "standalone", "ai-agent": true, overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", "ai-agent": true, overwrite: true }, templateRoot); const mainTs = readGenerated(root, "src/main.ts"); @@ -150,10 +129,7 @@ describe("initCommand — standalone", () => { }); it("excludes AI agent config by default", async () => { - await initCommand( - { _: [root], type: "standalone", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", overwrite: true }, templateRoot); const mainTs = readGenerated(root, "src/main.ts"); @@ -161,10 +137,7 @@ describe("initCommand — standalone", () => { }); it("includes tenant routes when --tenant-routes is set", async () => { - await initCommand( - { _: [root], type: "standalone", "tenant-routes": true, overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", "tenant-routes": true, overwrite: true }, templateRoot); const routes = readGenerated(root, "src/router/routes.ts"); @@ -173,10 +146,7 @@ describe("initCommand — standalone", () => { }); it("excludes tenant routes by default", async () => { - await initCommand( - { _: [root], type: "standalone", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", overwrite: true }, templateRoot); const routes = readGenerated(root, "src/router/routes.ts"); @@ -186,10 +156,7 @@ describe("initCommand — standalone", () => { }); it("dashboard adds routes and pages", async () => { - await initCommand( - { _: [root], type: "standalone", dashboard: true, overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", dashboard: true, overwrite: true }, templateRoot); const routes = readGenerated(root, "src/router/routes.ts"); @@ -198,10 +165,7 @@ describe("initCommand — standalone", () => { }); it("no dashboard route when dashboard is off", async () => { - await initCommand( - { _: [root], type: "standalone", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", overwrite: true }, templateRoot); const routes = readGenerated(root, "src/router/routes.ts"); @@ -219,7 +183,7 @@ describe("initCommand — standalone", () => { dashboard: true, mocks: true, overwrite: true, - } as unknown as Record, + }, templateRoot, ); @@ -255,10 +219,7 @@ describe("initCommand — standalone", () => { }); it("has no extra blank lines in main.ts", async () => { - await initCommand( - { _: [root], type: "standalone", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", overwrite: true }, templateRoot); const mainTs = readGenerated(root, "src/main.ts"); @@ -279,10 +240,7 @@ describe("initCommand — standalone module locales", () => { }); it("module pages use $t() for all user-facing strings", async () => { - await initCommand( - { _: [root], type: "standalone", "module-name": "Orders", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", "module-name": "Orders", overwrite: true }, templateRoot); const listVue = readGenerated(root, "src/modules/orders/pages/list.vue"); const detailsVue = readGenerated(root, "src/modules/orders/pages/details.vue"); @@ -311,10 +269,7 @@ describe("initCommand — standalone module locales", () => { }); it("locales en.json has all required keys", async () => { - await initCommand( - { _: [root], type: "standalone", "module-name": "Orders", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", "module-name": "Orders", overwrite: true }, templateRoot); const locales = JSON.parse(readGenerated(root, "src/modules/orders/locales/en.json")); @@ -333,10 +288,7 @@ describe("initCommand — standalone module locales", () => { }); it("module index.ts imports and passes locales", async () => { - await initCommand( - { _: [root], type: "standalone", "module-name": "Orders", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "standalone", "module-name": "Orders", overwrite: true }, templateRoot); const indexTs = readGenerated(root, "src/modules/orders/index.ts"); @@ -358,10 +310,7 @@ describe("initCommand — dynamic-module", () => { }); it("always generates module even without --module-name", async () => { - await initCommand( - { _: [root], type: "dynamic-module", overwrite: true } as unknown as Record, - templateRoot, - ); + await initCommand({ _: [root], type: "dynamic-module", overwrite: true }, templateRoot); // Module files are rendered into src/modules/ (flat, not nested for dynamic-module) expect(fileExists(root, "src/modules/index.ts")).toBe(true); @@ -370,13 +319,7 @@ describe("initCommand — dynamic-module", () => { }); it("uses provided --module-name", async () => { - await initCommand( - { _: [root], type: "dynamic-module", "module-name": "Reviews", overwrite: true } as unknown as Record< - string, - unknown - >, - templateRoot, - ); + await initCommand({ _: [root], type: "dynamic-module", "module-name": "Reviews", overwrite: true }, templateRoot); const indexTs = readGenerated(root, "src/modules/index.ts"); expect(indexTs).toContain("defineAppModule"); diff --git a/cli/create-vc-app/src/commands/init.ts b/cli/create-vc-app/src/commands/init.ts index 93d1386af..177328600 100644 --- a/cli/create-vc-app/src/commands/init.ts +++ b/cli/create-vc-app/src/commands/init.ts @@ -2,7 +2,7 @@ import prompts from "prompts"; import pc from "picocolors"; import path from "node:path"; import fs from "node:fs"; -import type { ProjectOptions, ProjectType } from "../types.js"; +import type { CLIArgs, ProjectOptions, ProjectType } from "../types.js"; import { isValidPackageName, toValidPackageName, @@ -19,9 +19,13 @@ const PROJECT_TYPES: { title: string; value: ProjectType }[] = [ { title: "Dynamic Module — remote module loaded by host via Module Federation", value: "dynamic-module" }, ]; -export async function initCommand(args: Record, templateRoot: string): Promise { +function isProjectType(value: unknown): value is ProjectType { + return typeof value === "string" && PROJECT_TYPES.some((t) => t.value === value); +} + +export async function initCommand(args: CLIArgs, templateRoot: string): Promise { const cwd = process.cwd(); - const argName = (args._ as string[])?.[0] || (args.name as string) || (args["app-name"] as string); + const argName = args._?.[0] || args.name || args["app-name"]; let dir = argName; const defaultAppName = !dir ? "vc-app" : dir; const getProjectName = () => (dir === "." ? path.basename(path.resolve()) : dir!); @@ -35,32 +39,37 @@ export async function initCommand(args: Record, templateRoot: s dir = dir || defaultAppName; const root = path.resolve(cwd, dir); + if (!isProjectType(args.type)) { + const valid = PROJECT_TYPES.map((t) => t.value).join(", "); + console.error(pc.red(`Unknown project type: "${args.type}". Valid types: ${valid}`)); + process.exit(1); + } + if (fs.existsSync(root) && !isDirEmpty(root) && !args.overwrite) { console.error(pc.red(`Target directory "${dir}" is not empty. Use --overwrite to overwrite.`)); process.exit(1); } const projectName = getProjectName(); - const projectType = args.type as ProjectType; + const projectType = args.type; // For standalone, module is opt-in: only generated when --module-name is explicitly provided. // For dynamic-module, module is always required — default to project name. - const explicitModule = args["module-name"] as string | undefined; + const explicitModule = args["module-name"]; const moduleName = projectType === "dynamic-module" ? explicitModule || toSentenceCase(projectName) : explicitModule || undefined; options = { projectName: toKebabCase(projectName), packageName: - (args["package-name"] as string) || - (isValidPackageName(projectName) ? projectName : toValidPackageName(projectName)), + args["package-name"] || (isValidPackageName(projectName) ? projectName : toValidPackageName(projectName)), projectType, moduleName, - basePath: (args["base-path"] as string) || toValidBasePath(`/apps/${toKebabCase(projectName)}/`), - tenantRoutes: (args["tenant-routes"] as boolean) || false, - aiAgent: (args["ai-agent"] as boolean) || false, - dashboard: (args.dashboard as boolean) || false, - mocks: (args.mocks as boolean) || false, + basePath: args["base-path"] || toValidBasePath(`/apps/${toKebabCase(projectName)}/`), + tenantRoutes: args["tenant-routes"] || false, + aiAgent: args["ai-agent"] || false, + dashboard: args.dashboard || false, + mocks: args.mocks || false, }; } else { // Interactive mode — split into phases so computed defaults are resolved before use diff --git a/cli/create-vc-app/src/index.ts b/cli/create-vc-app/src/index.ts index 43c9e8fdd..f8f9de4d3 100644 --- a/cli/create-vc-app/src/index.ts +++ b/cli/create-vc-app/src/index.ts @@ -6,27 +6,11 @@ import { fileURLToPath } from "node:url"; import mainPkg from "../package.json"; import { initCommand } from "./commands/init"; import { addModuleCommand } from "./commands/add-module"; +import type { CLIArgs } from "./types.js"; // Resolved from entry point — works both in source (tsx) and built (dist/index.js) const templateRoot = path.resolve(fileURLToPath(import.meta.url), "..", "templates"); -interface CLIArgs { - _: string[]; - help?: boolean; - version?: boolean; - type?: string; - name?: string; - "app-name"?: string; - "package-name"?: string; - "module-name"?: string; - "base-path"?: string; - mocks?: boolean; - overwrite?: boolean; - "tenant-routes"?: boolean; - "ai-agent"?: boolean; - dashboard?: boolean; -} - function showHelp() { console.log(` ${pc.bold(pc.green("create-vc-app"))} — Create VC Shell applications and modules @@ -79,9 +63,9 @@ async function main() { const subcommand = args._[0]; if (subcommand === "add-module") { - await addModuleCommand(args as unknown as Record, templateRoot); + await addModuleCommand(args, templateRoot); } else { - await initCommand(args as unknown as Record, templateRoot); + await initCommand(args, templateRoot); } } diff --git a/cli/create-vc-app/src/output.ts b/cli/create-vc-app/src/output.ts index c61c0cad4..8b0bba2e0 100644 --- a/cli/create-vc-app/src/output.ts +++ b/cli/create-vc-app/src/output.ts @@ -7,7 +7,7 @@ const PROJECT_TYPE_LABELS: Record = { }; export function printSuccess(options: ProjectOptions): void { - const typeLabel = PROJECT_TYPE_LABELS[options.projectType]; + const typeLabel = PROJECT_TYPE_LABELS[options.projectType] ?? options.projectType; const hasModule = !!options.moduleName; console.log(` diff --git a/cli/create-vc-app/src/templates/host-app/LICENSE b/cli/create-vc-app/src/templates/host-app/LICENSE deleted file mode 100644 index 7d4778229..000000000 --- a/cli/create-vc-app/src/templates/host-app/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) Virto Solutions LTD. All rights reserved. - -Licensed under the Virto Commerce Open Software License (the "License"); you -may not use this file except in compliance with the License. You may -obtain a copy of the License at - -https://virtocommerce.com/open-source-license - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. diff --git a/cli/create-vc-app/src/templates/host-app/README.md b/cli/create-vc-app/src/templates/host-app/README.md deleted file mode 100644 index ac5555649..000000000 --- a/cli/create-vc-app/src/templates/host-app/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# VirtoCommerce Vue3 Frontend for specialized back-office applications - -## Technologies used - -- **Vue3.** Progressive frontend framework with its key features allows to build fast applications. -- **Typescript.** All components and composables have type definitions, so IDE can help you to build clean and working code. -- **TailwindCSS.** The most popular and growing CSS framework providing wonderful flexible structure to speed up styling. -- **Husky + ESLint + Prettier.** Autoformat, check and fix your code and prevent ugly codestyle within repository. -- **Vite.** It is faster than Webpack. Really FASTER. Use it to develop with HMR benefits and to build for production. - -## Architecture - -```text -├─ public // Static assets -│ ├─ assets // Static images used inside the application. -│ └─ img -│ └─ icons // Icons used for favicons, PWA, etc. -├─ src -│ ├─ api_client // Generated API clients folder -│ │ └─... -│ ├─ components // Universal Vue components -│ │ └─... -│ ├─ config // Application extras config files -│ │ └─ push-hub.ts // SignalR config file -│ ├─ locales // Locale files used to provide translated content -│ │ └─ en.json -│ ├─ modules // The collection of custom modules -│ │ └─ ... // Module folder -│ │ ├─ components // The collection of components specific for this module -│ │ ├─ composables // The collection of shared logic written using Composable API pattern. -│ │ ├─ locales // Locale files used to provide translated content specific for this module -│ │ ├─ pages // Set of module pages used within Application router -│ │ └─ index.ts // Module entry point -│ ├─ pages // Set of application pages used within Application router. -│ │ └─... -│ ├─ router // SPA routing configuration -│ │ └─... -│ ├─ styles // Extras application style files -│ │ └─ index.scss // Tailwind initialization file -│ └─ types // Typescript .d.ts files -``` - -## Getting started - -```bash -# install and configure package dependencies and git hooks -$ yarn - -# build application -$ yarn build - -# start application with hot reload at localhost:8080 -$ yarn serve -``` diff --git a/cli/create-vc-app/src/templates/host-app/_browserslistrc b/cli/create-vc-app/src/templates/host-app/_browserslistrc deleted file mode 100644 index 256c3b897..000000000 --- a/cli/create-vc-app/src/templates/host-app/_browserslistrc +++ /dev/null @@ -1,3 +0,0 @@ -> 1% -last 2 versions -not dead diff --git a/cli/create-vc-app/src/templates/host-app/_commitlintrc.json b/cli/create-vc-app/src/templates/host-app/_commitlintrc.json deleted file mode 100644 index c8926a969..000000000 --- a/cli/create-vc-app/src/templates/host-app/_commitlintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@commitlint/config-conventional"] -} diff --git a/cli/create-vc-app/src/templates/host-app/_editorconfig b/cli/create-vc-app/src/templates/host-app/_editorconfig deleted file mode 100644 index d38912c5a..000000000 --- a/cli/create-vc-app/src/templates/host-app/_editorconfig +++ /dev/null @@ -1,22 +0,0 @@ -# top-most EditorConfig file -root = true - -# Global rules, override on case-by-case basis -[*] -charset = utf-8 -indent_style = space -max_line_length = 120 -tab_width = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.{vue,js,ts,scss}] -quote_type = double - -[*.md] -max_line_length = off -trim_trailing_whitespace = false - -[*.svg] -insert_final_newline = false diff --git a/cli/create-vc-app/src/templates/host-app/_env.ejs b/cli/create-vc-app/src/templates/host-app/_env.ejs deleted file mode 100644 index 8ada29696..000000000 --- a/cli/create-vc-app/src/templates/host-app/_env.ejs +++ /dev/null @@ -1,3 +0,0 @@ -APP_BASE_PATH=<%- BasePath %> -APP_I18N_LOCALE=en -APP_I18N_FALLBACK_LOCALE=en diff --git a/cli/create-vc-app/src/templates/host-app/_env.local.ejs b/cli/create-vc-app/src/templates/host-app/_env.local.ejs deleted file mode 100644 index bba332ebe..000000000 --- a/cli/create-vc-app/src/templates/host-app/_env.local.ejs +++ /dev/null @@ -1 +0,0 @@ -#APP_PLATFORM_URL=add_platform_url_here diff --git a/cli/create-vc-app/src/templates/host-app/_eslintignore b/cli/create-vc-app/src/templates/host-app/_eslintignore deleted file mode 100644 index a4a3b4121..000000000 --- a/cli/create-vc-app/src/templates/host-app/_eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -dist -api-client.ts diff --git a/cli/create-vc-app/src/templates/host-app/_eslintrc.js b/cli/create-vc-app/src/templates/host-app/_eslintrc.js deleted file mode 100644 index af380fff7..000000000 --- a/cli/create-vc-app/src/templates/host-app/_eslintrc.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - root: true, - env: { - node: true, - }, - plugins: ["@typescript-eslint", "vue", "import"], - extends: [ - "plugin:vue/vue3-recommended", - "eslint:recommended", - "plugin:import/recommended", - "plugin:import/typescript", - "@vue/typescript/recommended", - "@vue/prettier", - "@vue/eslint-config-typescript/recommended", - ], - parser: "vue-eslint-parser", - parserOptions: { - sourceType: "module", - ecmaVersion: 2022, - }, - settings: { - "import/parsers": { - "@typescript-eslint/parser": [".ts"], - }, - "import/resolver": { - typescript: { - project: ["./tsconfig.json"], - }, - }, - }, - rules: { - "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", - "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", - "@typescript-eslint/ban-ts-comment": "warn", - "@typescript-eslint/no-unused-vars": "warn", - "vue/multi-word-component-names": "off", - "vue/require-default-prop": "off", - "vue/no-v-html": "off", - "vue/no-template-shadow": "off", - }, -}; diff --git a/cli/create-vc-app/src/templates/host-app/_github/COMMIT_CONVENTION.md b/cli/create-vc-app/src/templates/host-app/_github/COMMIT_CONVENTION.md deleted file mode 100644 index b25d6bee8..000000000 --- a/cli/create-vc-app/src/templates/host-app/_github/COMMIT_CONVENTION.md +++ /dev/null @@ -1,91 +0,0 @@ -# Git Commit Message Convention - -## TL;DR - -Messages must be matched by the following regex: - -``` js -/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/ -``` - -## Examples - -Appears under "Features" header, `ui-kit` subheader: - -``` text -feat(ui-kit): add 'comments' option -``` - -Appears under "Bug Fixes" header, `shell` subheader, with a link to issue #28: - -``` text -fix(shell): handle events on blur - -close #28 -``` - -Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: - -``` text -perf(api-client): improve vdom diffing by removing 'foo' option - -BREAKING CHANGE: The 'foo' option has been removed. -``` - -The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. - -``` text -revert: feat(ui-kit): add 'comments' option - -This reverts commit 667ecc1654a317a13331b17617d973392f415f02. -``` - -## Full Message Format - -A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: - -``` text -(): - - - -