Skip to content

Commit 6e2a905

Browse files
committed
feat: add codegen scripts and improve build
1 parent e00f219 commit 6e2a905

30 files changed

+1563
-594
lines changed

apps/test-bot/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Client } from 'discord.js';
22
import { Logger, commandkit } from 'commandkit';
3-
import './ai';
3+
import './ai.ts';
44

55
const client = new Client({
66
intents: [

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"apps/*"
99
],
1010
"scripts": {
11+
"bootstrap": "turbo gen bootstrap --args",
1112
"lint": "turbo run --filter=\"./packages/*\" lint",
1213
"build": "turbo run --filter=\"./packages/*\" build",
1314
"publish-package": "pnpm publish-package",
@@ -71,8 +72,10 @@
7172
]
7273
},
7374
"dependencies": {
75+
"@turbo/gen": "^2.5.4",
7476
"fs-extra": "^11.3.0",
7577
"klaw-sync": "^7.0.0",
76-
"typescript": "^5.8.3"
78+
"typescript": "^5.8.3",
79+
"yaml": "^2.8.0"
7780
}
78-
}
81+
}

packages/ai/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
"commandkit",
2020
"ai"
2121
],
22-
"author": "twilight <[email protected]>",
22+
"contributors": [
23+
"Twilight <[email protected]>",
24+
25+
],
2326
"license": "MIT",
2427
"bugs": {
2528
"url": "https://github.com/underctrl-io/commandkit/issues"
@@ -29,10 +32,11 @@
2932
"commandkit": "workspace:*",
3033
"discord.js": "^14.19.3",
3134
"tsconfig": "workspace:*",
32-
"typescript": "^5.7.3"
35+
"typescript": "^5.7.3",
36+
"tsdown": "^0.12.7"
3337
},
3438
"dependencies": {
3539
"ai": "^4.3.16",
3640
"zod": "^3.25.48"
3741
}
38-
}
42+
}

packages/ai/tsdown.config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import createConfig from '../../tsdown.config';
2+
3+
export default createConfig();

packages/analytics/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
"commandkit",
2828
"analytics"
2929
],
30-
"author": "twilight <[email protected]>",
30+
"contributors": [
31+
"Twilight <[email protected]>",
32+
33+
],
3134
"license": "MIT",
3235
"bugs": {
3336
"url": "https://github.com/underctrl-io/commandkit/issues"
@@ -38,6 +41,7 @@
3841
"commandkit": "workspace:*",
3942
"posthog-node": "^4.18.0",
4043
"tsconfig": "workspace:*",
41-
"typescript": "^5.7.3"
44+
"typescript": "^5.7.3",
45+
"tsdown": "^0.12.7"
4246
}
43-
}
47+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import createConfig from '../../tsdown.config';
2+
3+
export default createConfig({
4+
entry: ['src'],
5+
unbundle: true,
6+
});

packages/cache/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
"cache management",
2323
"commandkit cache"
2424
],
25-
"author": "twilight <[email protected]>",
25+
"contributors": [
26+
"Twilight <[email protected]>",
27+
28+
],
2629
"license": "MIT",
2730
"bugs": {
2831
"url": "https://github.com/underctrl-io/commandkit/issues"
@@ -32,10 +35,11 @@
3235
"@types/ms": "^2.0.0",
3336
"commandkit": "workspace:*",
3437
"tsconfig": "workspace:*",
35-
"typescript": "^5.7.3"
38+
"typescript": "^5.7.3",
39+
"tsdown": "^0.12.7"
3640
},
3741
"dependencies": {
3842
"ms": "^2.1.3",
3943
"stable-hash": "^0.0.6"
4044
}
41-
}
45+
}

packages/cache/tsdown.config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import createConfig from '../../tsdown.config';
2+
3+
export default createConfig();

packages/commandkit/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ You can find the full documentation [here](https://commandkit.dev).
4141

4242
To create a new CommandKit project, you can use the following command:
4343

44-
<!-- TODO: use stable version -->
4544

4645
```bash
47-
npm create commandkit@dev
46+
npm create commandkit
4847
```
4948

5049
This will prompt you to enter few details about your project. Once you have entered the details, you can simply run `commandkit dev` to start the bot application.

packages/commandkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@
151151
"engines": {
152152
"node": ">=22"
153153
}
154-
}
154+
}

0 commit comments

Comments
 (0)