@icebreakers/monorepo-templates 1.0.1 → 1.0.2
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/assets/commitlint.config.ts +3 -1
- package/assets/eslint.config.js +14 -2
- package/assets/lint-staged.config.js +3 -1
- package/assets/package.json +2 -2
- package/assets/repoctl.config.ts +3 -30
- package/assets/stylelint.config.js +3 -1
- package/assets/vitest.config.ts +3 -1
- package/dist/index.mjs +11 -2
- package/package.json +1 -1
- package/templates/client/package.json +2 -2
- package/templates/server/package.json +1 -1
- package/templates/vitepress/package.json +1 -1
- package/templates/vue-lib/package.json +1 -1
package/assets/eslint.config.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadMonorepoToolingModule } from './tooling/load-tooling-module.mjs'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const { defineEslintConfig } = await loadMonorepoToolingModule()
|
|
4
|
+
|
|
5
|
+
const config = await defineEslintConfig()
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
...config,
|
|
9
|
+
{
|
|
10
|
+
ignores: [
|
|
11
|
+
'packages/monorepo/test/fixtures/demo/**',
|
|
12
|
+
'templates/vitepress/.vitepress/config.ts.timestamp-*.mjs',
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
]
|
package/assets/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.33.
|
|
6
|
+
"packageManager": "pnpm@10.33.3",
|
|
7
7
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"es-toolkit": "^1.46.1",
|
|
72
72
|
"eslint": "^10.3.0",
|
|
73
73
|
"husky": "^9.1.7",
|
|
74
|
-
"lint-staged": "^
|
|
74
|
+
"lint-staged": "^17.0.2",
|
|
75
75
|
"only-allow": "^1.2.2",
|
|
76
76
|
"pathe": "^2.0.3",
|
|
77
77
|
"pkg-types": "^2.3.1",
|
package/assets/repoctl.config.ts
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import type { MonorepoConfig } from 'repoctl'
|
|
2
2
|
|
|
3
|
-
function createLintStagedConfig(monorepoCommand: string) {
|
|
4
|
-
return {
|
|
5
|
-
'*.{js,jsx,mjs,ts,tsx,mts,cts}': [
|
|
6
|
-
'eslint --fix',
|
|
7
|
-
],
|
|
8
|
-
'*.vue': [
|
|
9
|
-
'eslint --fix',
|
|
10
|
-
'stylelint --fix --allow-empty-input',
|
|
11
|
-
],
|
|
12
|
-
'*.{ts,tsx,mts,cts,vue}': (files: string[]) => {
|
|
13
|
-
const uniqueFiles = [...new Set(files)]
|
|
14
|
-
if (uniqueFiles.length === 0) {
|
|
15
|
-
return []
|
|
16
|
-
}
|
|
17
|
-
return `${monorepoCommand} verify staged-typecheck ${uniqueFiles.map(file => `'${file.replaceAll('\'', '\'\\\'\'')}'`).join(' ')}`
|
|
18
|
-
},
|
|
19
|
-
'*.{json,md,mdx,html,yml,yaml}': [
|
|
20
|
-
'eslint --fix',
|
|
21
|
-
],
|
|
22
|
-
'*.{css,scss,sass,less}': [
|
|
23
|
-
'stylelint --fix --allow-empty-input',
|
|
24
|
-
],
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
3
|
export default {
|
|
29
4
|
commands: {
|
|
30
5
|
create: {
|
|
@@ -33,7 +8,7 @@ export default {
|
|
|
33
8
|
},
|
|
34
9
|
clean: {
|
|
35
10
|
autoConfirm: false,
|
|
36
|
-
|
|
11
|
+
includePrivate: true,
|
|
37
12
|
},
|
|
38
13
|
upgrade: {
|
|
39
14
|
skipOverwrite: false,
|
|
@@ -51,13 +26,11 @@ export default {
|
|
|
51
26
|
rules: {},
|
|
52
27
|
},
|
|
53
28
|
lintStaged: {
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
tsconfig: {
|
|
57
|
-
compilerOptions: {},
|
|
29
|
+
monorepoCommand: 'pnpm exec repo',
|
|
58
30
|
},
|
|
59
31
|
vitest: {
|
|
60
32
|
includeWorkspaceRootConfig: false,
|
|
33
|
+
coverageExclude: ['**/dist/**'],
|
|
61
34
|
coverageSkipFull: true,
|
|
62
35
|
},
|
|
63
36
|
vitestProject: {
|
package/assets/vitest.config.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { defineVitestConfig } from 'repoctl/tooling'
|
|
2
1
|
import { defineConfig } from 'vitest/config'
|
|
2
|
+
import { loadMonorepoToolingModule } from './tooling/load-tooling-module.mjs'
|
|
3
|
+
|
|
4
|
+
const { defineVitestConfig } = await loadMonorepoToolingModule()
|
|
3
5
|
|
|
4
6
|
export default defineConfig(async () => await defineVitestConfig())
|
package/dist/index.mjs
CHANGED
|
@@ -210,7 +210,16 @@ async function resetDir(targetDir, overwriteExisting) {
|
|
|
210
210
|
await fs.mkdir(targetDir, { recursive: true });
|
|
211
211
|
}
|
|
212
212
|
async function copyEntry(from, to, overwriteExisting, filter) {
|
|
213
|
-
if (!overwriteExisting && await pathExists$1(to))
|
|
213
|
+
if (!overwriteExisting && await pathExists$1(to)) {
|
|
214
|
+
const [fromStats, toStats] = await Promise.all([fs.stat(from), fs.stat(to)]);
|
|
215
|
+
if (fromStats.isDirectory() && toStats.isDirectory()) await fs.cp(from, to, {
|
|
216
|
+
recursive: true,
|
|
217
|
+
force: false,
|
|
218
|
+
errorOnExist: false,
|
|
219
|
+
filter
|
|
220
|
+
});
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
214
223
|
try {
|
|
215
224
|
await fs.cp(from, to, {
|
|
216
225
|
recursive: true,
|
|
@@ -228,7 +237,7 @@ async function copyAssets(repoRoot, overwriteExisting) {
|
|
|
228
237
|
for (const target of assetTargets$1) {
|
|
229
238
|
const packageAsset = path$1.join(monorepoAssetRoot, toPublishGitignorePath(target));
|
|
230
239
|
const repoAsset = path$1.join(repoRoot, target);
|
|
231
|
-
const from = await pathExists$1(
|
|
240
|
+
const from = await pathExists$1(repoAsset) ? repoAsset : packageAsset;
|
|
232
241
|
if (!await pathExists$1(from)) continue;
|
|
233
242
|
const to = path$1.join(assetsDir, toPublishGitignorePath(target));
|
|
234
243
|
const stats = await fs.stat(from);
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"pinia": "^3.0.4",
|
|
26
26
|
"tailwind-merge": "^3.5.0",
|
|
27
27
|
"tailwind-variants": "^3.2.2",
|
|
28
|
-
"vue": "^3.5.
|
|
28
|
+
"vue": "^3.5.34",
|
|
29
29
|
"vue-i18n": "^11.4.0",
|
|
30
30
|
"vue-router": "^5.0.6"
|
|
31
31
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
40
40
|
"@vue/tsconfig": "^0.9.1",
|
|
41
41
|
"consola": "^3.4.2",
|
|
42
|
-
"hono": "^4.12.
|
|
42
|
+
"hono": "^4.12.18",
|
|
43
43
|
"tailwindcss": "^4.2.4",
|
|
44
44
|
"typescript": "~6.0.3",
|
|
45
45
|
"vite": "^8.0.10",
|