@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
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import { defineProject } from 'vitest/config'
|
|
3
|
-
|
|
4
|
-
export default defineProject({
|
|
5
|
-
test: {
|
|
6
|
-
alias: [
|
|
7
|
-
{
|
|
8
|
-
find: '@',
|
|
9
|
-
replacement: path.resolve(__dirname, './src'),
|
|
10
|
-
},
|
|
11
|
-
],
|
|
12
|
-
globals: true,
|
|
13
|
-
testTimeout: 60_000,
|
|
14
|
-
},
|
|
15
|
-
})
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import { defineBuildConfig } from 'unbuild'
|
|
3
|
-
|
|
4
|
-
export default defineBuildConfig({
|
|
5
|
-
// entries: ['./src/index', './src/cli'],
|
|
6
|
-
rollup: {
|
|
7
|
-
// 内联,相当于 nodeResolve
|
|
8
|
-
inlineDependencies: true,
|
|
9
|
-
// cjs
|
|
10
|
-
emitCJS: true,
|
|
11
|
-
// 添加 cjs 注入
|
|
12
|
-
cjsBridge: true,
|
|
13
|
-
dts: {
|
|
14
|
-
// https://github.com/unjs/unbuild/issues/135
|
|
15
|
-
respectExternal: false,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
alias: {
|
|
19
|
-
// 别名
|
|
20
|
-
'@': path.resolve(__dirname, './src'),
|
|
21
|
-
},
|
|
22
|
-
// dts
|
|
23
|
-
declaration: true,
|
|
24
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup'
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
entry: ['src/index.ts'],
|
|
5
|
-
shims: true,
|
|
6
|
-
format: ['cjs', 'esm'],
|
|
7
|
-
clean: true,
|
|
8
|
-
dts: true,
|
|
9
|
-
cjsInterop: true,
|
|
10
|
-
splitting: true,
|
|
11
|
-
outExtension({ format }) {
|
|
12
|
-
return {
|
|
13
|
-
js: `.${format === 'esm' ? 'mjs' : 'cjs'}`,
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
})
|