@apex-stack/core 0.1.13 → 0.1.14
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/dist/cli.js
CHANGED
|
@@ -112,7 +112,7 @@ var main = defineCommand2({
|
|
|
112
112
|
dev: () => import("./dev-BIPK7O5N.js").then((m) => m.devCommand),
|
|
113
113
|
build: () => import("./build-QRHQUUZC.js").then((m) => m.buildCommand),
|
|
114
114
|
start: () => import("./start-VJJXI4W3.js").then((m) => m.startCommand),
|
|
115
|
-
make: () => import("./make-
|
|
115
|
+
make: () => import("./make-5B5JSCQF.js").then((m) => m.makeCommand),
|
|
116
116
|
migrate: () => import("./migrate-NOGFOFV2.js").then((m) => m.migrateCommand),
|
|
117
117
|
mcp: () => import("./mcp-DL4J6JFJ.js").then((m) => m.mcpCommand)
|
|
118
118
|
},
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
|
3
3
|
import { dirname, join, resolve } from "path";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
|
+
function pascalCase(s) {
|
|
6
|
+
return s.replace(/[-_\s]+(.)?/g, (_, c) => c ? c.toUpperCase() : "").replace(/^(.)/, (c) => c.toUpperCase());
|
|
7
|
+
}
|
|
5
8
|
function pageTemplate(name) {
|
|
6
9
|
return `<script server lang="ts">
|
|
7
10
|
export function loader() {
|
|
@@ -49,7 +52,7 @@ function plan(kind, name, root) {
|
|
|
49
52
|
case "page":
|
|
50
53
|
return { path: join(root, "pages", `${name}.alpine`), contents: pageTemplate(name) };
|
|
51
54
|
case "component":
|
|
52
|
-
return { path: join(root, "components", `${name}.alpine`), contents: componentTemplate() };
|
|
55
|
+
return { path: join(root, "components", `${pascalCase(name)}.alpine`), contents: componentTemplate() };
|
|
53
56
|
case "api":
|
|
54
57
|
return { path: join(root, "server", "api", `${name}.ts`), contents: apiTemplate(name) };
|
|
55
58
|
}
|