create-kimesh 0.1.0-nightly.20260120032145 → 0.1.0-nightly.20260120063147
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/bin/create-kimesh.mjs +1 -9
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -3
- package/dist/main-CXj_0-LW.js +38 -0
- package/dist/main-DQV-uvOc.d.ts +17 -0
- package/dist/main.d.ts +2 -2
- package/dist/main.js +2 -2
- package/dist/run.d.ts +4 -3
- package/dist/run.js +7 -4
- package/package.json +12 -9
- package/dist/index-yXGND_OU.d.ts +0 -5
- package/dist/main-CV1B6u3V.js +0 -216
- package/dist/main-oBZSa6Es.d.ts +0 -25
- package/dist/src-BRiqFWwv.js +0 -10
package/bin/create-kimesh.mjs
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { runMain } from "../dist/index.js";
|
|
5
|
-
|
|
6
|
-
globalThis.__kimesh_cli__ = {
|
|
7
|
-
startTime: Date.now(),
|
|
8
|
-
entry: fileURLToPath(import.meta.url),
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
runMain();
|
|
3
|
+
import('../dist/run.js').then(m => m.run()).catch(console.error)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { main$1 as main
|
|
2
|
-
|
|
3
|
-
export { main, runMain, version };
|
|
1
|
+
import { main$1 as main } from "./main-DQV-uvOc.js";
|
|
2
|
+
export { main };
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
import consola from "consola";
|
|
3
|
+
import pc from "picocolors";
|
|
4
|
+
|
|
5
|
+
//#region src/main.ts
|
|
6
|
+
const main = defineCommand({
|
|
7
|
+
meta: {
|
|
8
|
+
name: "create-kimesh",
|
|
9
|
+
version: "0.1.0",
|
|
10
|
+
description: "Create a new Kimesh project"
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
dir: {
|
|
14
|
+
type: "positional",
|
|
15
|
+
description: "Project directory",
|
|
16
|
+
required: false
|
|
17
|
+
},
|
|
18
|
+
template: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Template to use",
|
|
21
|
+
alias: "t"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
async run({ args }) {
|
|
25
|
+
const projectDir = args.dir || ".";
|
|
26
|
+
const template = args.template || "default";
|
|
27
|
+
consola.info(`Creating new Kimesh project in ${pc.cyan(projectDir)}`);
|
|
28
|
+
consola.info(`Using template: ${pc.green(template)}`);
|
|
29
|
+
consola.success("Project created successfully!");
|
|
30
|
+
consola.info(`\nNext steps:`);
|
|
31
|
+
consola.info(` cd ${projectDir}`);
|
|
32
|
+
consola.info(` bun install`);
|
|
33
|
+
consola.info(` bun dev`);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { main };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as citty0 from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/main.d.ts
|
|
4
|
+
declare const main: citty0.CommandDef<{
|
|
5
|
+
dir: {
|
|
6
|
+
type: "positional";
|
|
7
|
+
description: string;
|
|
8
|
+
required: false;
|
|
9
|
+
};
|
|
10
|
+
template: {
|
|
11
|
+
type: "string";
|
|
12
|
+
description: string;
|
|
13
|
+
alias: string;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { main as main$1 };
|
package/dist/main.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { main$1 as main
|
|
2
|
-
export { main
|
|
1
|
+
import { main$1 as main } from "./main-DQV-uvOc.js";
|
|
2
|
+
export { main };
|
package/dist/main.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { main
|
|
1
|
+
import { main } from "./main-CXj_0-LW.js";
|
|
2
2
|
|
|
3
|
-
export { main
|
|
3
|
+
export { main };
|
package/dist/run.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/run.d.ts
|
|
2
|
+
declare function run(): void;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { run };
|
package/dist/run.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import "./main-
|
|
2
|
-
import { runMain } from "
|
|
1
|
+
import { main } from "./main-CXj_0-LW.js";
|
|
2
|
+
import { runMain } from "citty";
|
|
3
3
|
|
|
4
4
|
//#region src/run.ts
|
|
5
|
-
|
|
5
|
+
function run() {
|
|
6
|
+
runMain(main);
|
|
7
|
+
}
|
|
8
|
+
run();
|
|
6
9
|
|
|
7
10
|
//#endregion
|
|
8
|
-
export {
|
|
11
|
+
export { run };
|
package/package.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-kimesh",
|
|
3
|
-
"version": "0.1.0-nightly.
|
|
3
|
+
"version": "0.1.0-nightly.20260120063147",
|
|
4
4
|
"description": "Create a new Kimesh project",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-kimesh": "./bin/create-kimesh.mjs"
|
|
8
|
+
},
|
|
6
9
|
"exports": {
|
|
7
10
|
".": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
10
13
|
}
|
|
11
14
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
15
17
|
"files": [
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
+
"dist",
|
|
19
|
+
"bin"
|
|
18
20
|
],
|
|
19
21
|
"scripts": {
|
|
20
22
|
"build": "tsdown",
|
|
@@ -23,8 +25,9 @@
|
|
|
23
25
|
"dependencies": {
|
|
24
26
|
"citty": "^0.1.6",
|
|
25
27
|
"consola": "^3.4.2",
|
|
28
|
+
"exsolve": "^1.0.8",
|
|
26
29
|
"picocolors": "^1.1.1",
|
|
27
|
-
"
|
|
30
|
+
"giget": "^2.0.0"
|
|
28
31
|
},
|
|
29
32
|
"devDependencies": {
|
|
30
33
|
"@types/node": "^22.13.1",
|
package/dist/index-yXGND_OU.d.ts
DELETED
package/dist/main-CV1B6u3V.js
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from "citty";
|
|
2
|
-
import { join, resolve } from "node:path";
|
|
3
|
-
import * as fs from "node:fs";
|
|
4
|
-
import consola from "consola";
|
|
5
|
-
import pc from "picocolors";
|
|
6
|
-
|
|
7
|
-
//#region ../km/src/commands/init.ts
|
|
8
|
-
var init_default = defineCommand({
|
|
9
|
-
meta: {
|
|
10
|
-
name: "init",
|
|
11
|
-
description: "Initialize a new Kimesh project in the current directory"
|
|
12
|
-
},
|
|
13
|
-
args: {
|
|
14
|
-
root: {
|
|
15
|
-
type: "string",
|
|
16
|
-
alias: "r",
|
|
17
|
-
description: "Project root directory"
|
|
18
|
-
},
|
|
19
|
-
force: {
|
|
20
|
-
type: "boolean",
|
|
21
|
-
alias: "f",
|
|
22
|
-
description: "Overwrite existing files",
|
|
23
|
-
default: false
|
|
24
|
-
},
|
|
25
|
-
typescript: {
|
|
26
|
-
type: "boolean",
|
|
27
|
-
alias: "ts",
|
|
28
|
-
description: "Initialize with TypeScript",
|
|
29
|
-
default: true
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
async run({ args }) {
|
|
33
|
-
const root = resolve(args.root || process.cwd());
|
|
34
|
-
consola.info(`Initializing Kimesh project in ${pc.cyan(root)}...`);
|
|
35
|
-
if (!fs.existsSync(root)) {
|
|
36
|
-
fs.mkdirSync(root, { recursive: true });
|
|
37
|
-
consola.log(` ${pc.green("+")} Created directory: ${root}`);
|
|
38
|
-
}
|
|
39
|
-
const configPath = join(root, "kimesh.config.ts");
|
|
40
|
-
if (fs.existsSync(configPath) && !args.force) {
|
|
41
|
-
consola.warn(`${pc.yellow("kimesh.config.ts already exists.")} Use ${pc.cyan("--force")} to overwrite.`);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const dirs = [
|
|
45
|
-
"routes",
|
|
46
|
-
"components",
|
|
47
|
-
"composables",
|
|
48
|
-
"utils",
|
|
49
|
-
"public"
|
|
50
|
-
];
|
|
51
|
-
for (const dir of dirs) {
|
|
52
|
-
const dirPath = join(root, dir);
|
|
53
|
-
if (!fs.existsSync(dirPath)) {
|
|
54
|
-
fs.mkdirSync(dirPath, { recursive: true });
|
|
55
|
-
consola.log(` ${pc.green("+")} ${dir}/`);
|
|
56
|
-
} else consola.log(` ${pc.dim("○")} ${dir}/ (exists)`);
|
|
57
|
-
}
|
|
58
|
-
const configContent = `import { defineKmConfig } from '@kimesh/kit'
|
|
59
|
-
|
|
60
|
-
export default defineKmConfig({
|
|
61
|
-
// Application name
|
|
62
|
-
name: '${getProjectName(root)}',
|
|
63
|
-
|
|
64
|
-
// Development server options
|
|
65
|
-
dev: {
|
|
66
|
-
port: 3000,
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
// Components configuration
|
|
70
|
-
components: {
|
|
71
|
-
dirs: ['components'],
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
// Composables configuration
|
|
75
|
-
composables: {
|
|
76
|
-
dirs: ['composables'],
|
|
77
|
-
},
|
|
78
|
-
})
|
|
79
|
-
`;
|
|
80
|
-
fs.writeFileSync(configPath, configContent);
|
|
81
|
-
consola.log(` ${pc.green("+")} kimesh.config.ts`);
|
|
82
|
-
const appVuePath = join(root, "app.vue");
|
|
83
|
-
if (!fs.existsSync(appVuePath) || args.force) {
|
|
84
|
-
const appVueContent = `<script setup lang="ts">
|
|
85
|
-
// Your app setup goes here
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
<template>
|
|
89
|
-
<router-view />
|
|
90
|
-
</template>
|
|
91
|
-
|
|
92
|
-
<style>
|
|
93
|
-
:root {
|
|
94
|
-
--color-primary: #3b82f6;
|
|
95
|
-
--color-secondary: #6366f1;
|
|
96
|
-
}
|
|
97
|
-
</style>
|
|
98
|
-
`;
|
|
99
|
-
fs.writeFileSync(appVuePath, appVueContent);
|
|
100
|
-
consola.log(` ${pc.green("+")} app.vue`);
|
|
101
|
-
}
|
|
102
|
-
const indexRoutePath = join(root, "routes", "index.vue");
|
|
103
|
-
if (!fs.existsSync(indexRoutePath) || args.force) {
|
|
104
|
-
const indexRouteContent = `<script setup lang="ts">
|
|
105
|
-
// Home page
|
|
106
|
-
</script>
|
|
107
|
-
|
|
108
|
-
<template>
|
|
109
|
-
<div class="home">
|
|
110
|
-
<h1>Welcome to Kimesh</h1>
|
|
111
|
-
<p>Your Vue.js application is ready!</p>
|
|
112
|
-
<p>Edit <code>routes/index.vue</code> to get started.</p>
|
|
113
|
-
</div>
|
|
114
|
-
</template>
|
|
115
|
-
|
|
116
|
-
<style scoped>
|
|
117
|
-
.home {
|
|
118
|
-
max-width: 800px;
|
|
119
|
-
margin: 0 auto;
|
|
120
|
-
padding: 2rem;
|
|
121
|
-
text-align: center;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
h1 {
|
|
125
|
-
color: var(--color-primary);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
code {
|
|
129
|
-
background: #f0f0f0;
|
|
130
|
-
padding: 0.25rem 0.5rem;
|
|
131
|
-
border-radius: 4px;
|
|
132
|
-
}
|
|
133
|
-
</style>
|
|
134
|
-
`;
|
|
135
|
-
fs.writeFileSync(indexRoutePath, indexRouteContent);
|
|
136
|
-
consola.log(` ${pc.green("+")} routes/index.vue`);
|
|
137
|
-
}
|
|
138
|
-
if (args.typescript) {
|
|
139
|
-
const tsconfigPath = join(root, "tsconfig.json");
|
|
140
|
-
if (!fs.existsSync(tsconfigPath) || args.force) {
|
|
141
|
-
const tsconfigContent = `{
|
|
142
|
-
"extends": "./.kimesh/tsconfig.json",
|
|
143
|
-
"compilerOptions": {
|
|
144
|
-
"strict": true
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
`;
|
|
148
|
-
fs.writeFileSync(tsconfigPath, tsconfigContent);
|
|
149
|
-
consola.log(` ${pc.green("+")} tsconfig.json`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
const gitignorePath = join(root, ".gitignore");
|
|
153
|
-
if (!fs.existsSync(gitignorePath) || args.force) {
|
|
154
|
-
const gitignoreContent = `# Dependencies
|
|
155
|
-
node_modules/
|
|
156
|
-
|
|
157
|
-
# Build output
|
|
158
|
-
dist/
|
|
159
|
-
.kimesh/
|
|
160
|
-
|
|
161
|
-
# Environment
|
|
162
|
-
.env
|
|
163
|
-
.env.local
|
|
164
|
-
.env.*.local
|
|
165
|
-
|
|
166
|
-
# Logs
|
|
167
|
-
*.log
|
|
168
|
-
|
|
169
|
-
# Editor
|
|
170
|
-
.vscode/
|
|
171
|
-
.idea/
|
|
172
|
-
|
|
173
|
-
# OS
|
|
174
|
-
.DS_Store
|
|
175
|
-
Thumbs.db
|
|
176
|
-
`;
|
|
177
|
-
fs.writeFileSync(gitignorePath, gitignoreContent);
|
|
178
|
-
consola.log(` ${pc.green("+")} .gitignore`);
|
|
179
|
-
}
|
|
180
|
-
consola.log("");
|
|
181
|
-
consola.success(`Kimesh project initialized!`);
|
|
182
|
-
consola.log("");
|
|
183
|
-
consola.info("Next steps:");
|
|
184
|
-
consola.log(` 1. Install dependencies: ${pc.cyan("bun install")}`);
|
|
185
|
-
consola.log(` 2. Prepare TypeScript: ${pc.cyan("kmi prepare")}`);
|
|
186
|
-
consola.log(` 3. Start dev server: ${pc.cyan("kmi dev")}`);
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
/**
|
|
190
|
-
* Get project name from directory path
|
|
191
|
-
*/
|
|
192
|
-
function getProjectName(root) {
|
|
193
|
-
const basename = root.split(/[/\\]/).pop() || "my-app";
|
|
194
|
-
return basename.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/main.ts
|
|
199
|
-
const name = "create-kimesh";
|
|
200
|
-
const version = "0.1.0";
|
|
201
|
-
const description = "Create a new Kimesh project";
|
|
202
|
-
const _main = defineCommand({
|
|
203
|
-
meta: {
|
|
204
|
-
name,
|
|
205
|
-
version,
|
|
206
|
-
description
|
|
207
|
-
},
|
|
208
|
-
args: init_default.args,
|
|
209
|
-
async setup(ctx) {
|
|
210
|
-
await init_default.run?.(ctx);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
const main = _main;
|
|
214
|
-
|
|
215
|
-
//#endregion
|
|
216
|
-
export { main, version };
|
package/dist/main-oBZSa6Es.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as citty0 from "citty";
|
|
2
|
-
|
|
3
|
-
//#region src/main.d.ts
|
|
4
|
-
declare const version = "0.1.0";
|
|
5
|
-
declare const main: citty0.CommandDef<{
|
|
6
|
-
root: {
|
|
7
|
-
type: "string";
|
|
8
|
-
alias: string;
|
|
9
|
-
description: string;
|
|
10
|
-
};
|
|
11
|
-
force: {
|
|
12
|
-
type: "boolean";
|
|
13
|
-
alias: string;
|
|
14
|
-
description: string;
|
|
15
|
-
default: false;
|
|
16
|
-
};
|
|
17
|
-
typescript: {
|
|
18
|
-
type: "boolean";
|
|
19
|
-
alias: string;
|
|
20
|
-
description: string;
|
|
21
|
-
default: true;
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { main as main$1, version as version$1 };
|
package/dist/src-BRiqFWwv.js
DELETED