@icebreakers/monorepo-templates 0.1.16 → 1.0.1
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 +12 -0
- package/assets/.changeset/config.json +7 -2
- package/assets/.github/workflows/ci.yml +8 -2
- package/assets/.github/workflows/release.yml +2 -2
- package/assets/.husky/commit-msg +1 -1
- package/assets/.husky/pre-commit +1 -1
- package/assets/.husky/pre-push +5 -0
- package/assets/AGENTS.md +8 -7
- package/assets/Dockerfile +5 -14
- package/assets/commitlint.config.ts +2 -2
- package/assets/eslint.config.js +2 -6
- package/assets/lint-staged.config.js +3 -0
- package/assets/package.json +41 -31
- package/assets/repoctl.config.ts +68 -0
- package/assets/stylelint.config.js +2 -2
- package/assets/tsconfig.json +1 -49
- package/assets/turbo.json +17 -6
- package/assets/vitest.config.ts +2 -125
- package/assets-data.mjs +3 -2
- package/dist/index.d.mts +22 -1
- package/dist/index.mjs +114 -32
- package/package.json +12 -8
- package/template-data.mjs +48 -8
- package/templates/cli/bin/index.js +1 -1
- package/templates/cli/package.json +5 -2
- package/templates/cli/{tsup.config.ts → tsdown.config.ts} +3 -2
- package/templates/client/eslint.config.js +5 -5
- package/templates/client/gitignore +0 -1
- package/templates/client/package.json +22 -22
- package/templates/client/vite.config.ts +4 -3
- package/templates/client/worker-configuration.d.ts +13557 -0
- package/templates/client/wrangler.jsonc +4 -6
- package/templates/server/eslint.config.js +8 -0
- package/templates/server/gitignore +0 -1
- package/templates/server/package.json +9 -8
- package/templates/server/src/app.ts +4 -4
- package/templates/server/tsconfig.json +1 -2
- package/templates/server/{tsup.config.ts → tsdown.config.ts} +2 -1
- package/templates/server/vitest.config.ts +7 -5
- package/templates/server/worker-configuration.d.ts +13557 -0
- package/templates/server/wrangler.jsonc +4 -6
- package/templates/tsdown/package.json +2 -1
- package/templates/tsdown/test-d/index.test-d.ts +5 -0
- package/templates/tsdown/tsconfig.json +1 -2
- package/templates/tsdown/vitest.config.ts +7 -5
- package/templates/vitepress/.vitepress/config.ts +34 -36
- package/templates/vitepress/getting-started.md +243 -0
- package/templates/vitepress/gitignore +2 -1
- package/templates/vitepress/index.md +144 -79
- package/templates/vitepress/monorepo/commands.md +291 -0
- package/templates/vitepress/monorepo/index.md +103 -34
- package/templates/vitepress/monorepo/manage.md +181 -80
- package/templates/vitepress/monorepo/publish.md +128 -57
- package/templates/vitepress/monorepo/templates.md +67 -0
- package/templates/vitepress/monorepo/troubleshooting.md +226 -0
- package/templates/vitepress/package.json +5 -5
- package/templates/vitepress/thinking.md +1 -1
- package/templates/vitepress/tools/husky.md +7 -2
- package/templates/vitepress/tools/lint-staged.md +15 -1
- package/templates/vitepress/why/examples/3.npm-basic-package/package-lock.json +605 -2770
- package/templates/vitepress/why/examples/3.npm-basic-package/package.json +5 -6
- package/templates/vitepress/why/examples/3.npm-basic-package/tsdown.config.ts +16 -0
- package/templates/vitepress/why/examples/usage-cjs/index.js +2 -6
- package/templates/vitepress/why/examples/usage-cjs/package-lock.json +7 -13
- package/templates/vitepress/why/examples/usage-cjs/package.json +2 -2
- package/templates/vitepress/why/examples/usage-esm/index.js +2 -2
- package/templates/vitepress/why/examples/usage-esm/package-lock.json +7 -13
- package/templates/vitepress/why/examples/usage-esm/package.json +2 -2
- package/templates/vitepress/why/modern/bundlers.md +19 -46
- package/templates/vue-lib/eslint.config.js +4 -4
- package/templates/vue-lib/package.json +15 -10
- package/templates/vue-lib/test-d/index.test-d.ts +6 -0
- package/templates/vue-lib/tsconfig.test.json +1 -1
- package/templates/vue-lib/vitest.config.ts +6 -5
- package/assets/monorepo.config.ts +0 -22
- package/assets/nano-staged.js +0 -18
- package/templates/tsup/build.config.ts +0 -24
- package/templates/tsup/package.json +0 -49
- package/templates/tsup/src/index.ts +0 -12
- package/templates/tsup/test/index.test.ts +0 -18
- package/templates/tsup/tsconfig.json +0 -15
- package/templates/tsup/tsup.config.ts +0 -18
- package/templates/tsup/vitest.config.ts +0 -15
- package/templates/unbuild/build.config.ts +0 -24
- package/templates/unbuild/package.json +0 -49
- package/templates/unbuild/src/index.ts +0 -9
- package/templates/unbuild/src/utils.ts +0 -5
- package/templates/unbuild/test/index.test.ts +0 -18
- package/templates/unbuild/tsconfig.json +0 -15
- package/templates/unbuild/vitest.config.ts +0 -15
- package/templates/vitepress/why/examples/3.npm-basic-package/build.config.ts +0 -24
- package/templates/vitepress/why/examples/3.npm-basic-package/tsup.config.ts +0 -16
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
"$schema": "./node_modules/wrangler/config-schema.json",
|
|
3
3
|
"name": "monorepo-client",
|
|
4
4
|
"compatibility_date": "2025-10-16",
|
|
5
|
+
"compatibility_flags": [
|
|
6
|
+
"nodejs_compat"
|
|
7
|
+
],
|
|
5
8
|
"main": "./worker/fetch-entry.ts",
|
|
6
9
|
"assets": {
|
|
7
10
|
"not_found_handling": "single-page-application",
|
|
@@ -12,12 +15,7 @@
|
|
|
12
15
|
"dev": {
|
|
13
16
|
"port": 8787
|
|
14
17
|
},
|
|
15
|
-
"routes"
|
|
16
|
-
{
|
|
17
|
-
"custom_domain": true,
|
|
18
|
-
"pattern": "client.monorepo.icebreaker.top"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
18
|
+
// Add "routes" here when you bind a real custom domain.
|
|
21
19
|
"observability": {
|
|
22
20
|
"enabled": true
|
|
23
21
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@icebreakers/server",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "tsdown build package template",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
27
|
"dev": "wrangler dev",
|
|
28
|
-
"build": "
|
|
29
|
-
"build:watch": "
|
|
28
|
+
"build": "tsdown",
|
|
29
|
+
"build:watch": "tsdown --watch --sourcemap",
|
|
30
30
|
"node:build:watch": "pnpm build:watch",
|
|
31
31
|
"node:build": "pnpm build",
|
|
32
32
|
"node:dev": "tsx watch src/node-entry.ts",
|
|
33
|
-
"node:start": "node dist/node-entry.
|
|
33
|
+
"node:start": "node dist/node-entry.mjs",
|
|
34
34
|
"test": "vitest run",
|
|
35
35
|
"test:dev": "vitest",
|
|
36
36
|
"release": "pnpm publish",
|
|
@@ -54,10 +54,11 @@
|
|
|
54
54
|
"types": "./dist/index.d.ts"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@hono/node-server": "^
|
|
57
|
+
"@hono/node-server": "^2.0.1",
|
|
58
58
|
"consola": "^3.4.2",
|
|
59
|
-
"hono": "^4.12.
|
|
60
|
-
"
|
|
61
|
-
"
|
|
59
|
+
"hono": "^4.12.17",
|
|
60
|
+
"tsdown": "0.21.10",
|
|
61
|
+
"wrangler": "^4.88.0",
|
|
62
|
+
"zod": "^4.4.3"
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -117,13 +117,13 @@ const grads: ColorStop[][] = [
|
|
|
117
117
|
]
|
|
118
118
|
|
|
119
119
|
// Convert hour to CSS gradient
|
|
120
|
-
|
|
120
|
+
function toCSSGradient(hour: number): string {
|
|
121
121
|
let css = 'linear-gradient(to bottom,'
|
|
122
|
-
const data = grads[hour]
|
|
122
|
+
const data = grads[hour] ?? grads[0]!
|
|
123
123
|
const len = data.length
|
|
124
124
|
|
|
125
125
|
for (let i = 0; i < len; i++) {
|
|
126
|
-
const item = data[i]
|
|
126
|
+
const item = data[i]!
|
|
127
127
|
css += ` #${item.color} ${item.position}%`
|
|
128
128
|
if (i < len - 1) {
|
|
129
129
|
css += ','
|
|
@@ -168,7 +168,7 @@ app.get('*', async (c) => {
|
|
|
168
168
|
html_content += `<p>${timezone}<br/></p>`
|
|
169
169
|
|
|
170
170
|
// Add background gradient based on hour
|
|
171
|
-
html_style += `body{background:${
|
|
171
|
+
html_style += `body{background:${toCSSGradient(hour)};}`
|
|
172
172
|
|
|
173
173
|
// Complete HTML document
|
|
174
174
|
const html = `
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import path from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { defineVitestProjectConfig } from 'repoctl/tooling'
|
|
2
4
|
import { defineProject } from 'vitest/config'
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
7
|
+
|
|
8
|
+
export default defineProject(await defineVitestProjectConfig({
|
|
9
|
+
options: {
|
|
6
10
|
alias: [
|
|
7
11
|
{
|
|
8
12
|
find: '@',
|
|
9
13
|
replacement: path.resolve(__dirname, './src'),
|
|
10
14
|
},
|
|
11
15
|
],
|
|
12
|
-
globals: true,
|
|
13
|
-
testTimeout: 60_000,
|
|
14
16
|
},
|
|
15
|
-
})
|
|
17
|
+
}))
|