@icebreakers/monorepo-templates 0.0.0 → 0.1.0
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/package.json +3 -3
- package/dist/index.d.mts +13 -1
- package/dist/index.mjs +26 -12
- package/package.json +9 -1
- package/skeleton/package.json +3 -3
- package/templates/client/package.json +3 -3
- package/templates/server/package.json +1 -1
- package/assets/.changeset/create-icebreaker-interactive.md +0 -5
- package/assets/.changeset/monorepo-templates-package.md +0 -5
- package/assets/.changeset/skills-sync-resources.md +0 -5
package/assets/package.json
CHANGED
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"@icebreakers/monorepo": "workspace:*",
|
|
54
54
|
"@icebreakers/stylelint-config": "^1.2.5",
|
|
55
55
|
"@types/fs-extra": "^11.0.4",
|
|
56
|
-
"@types/node": "^25.0.
|
|
56
|
+
"@types/node": "^25.0.9",
|
|
57
57
|
"@types/semver": "^7.7.1",
|
|
58
58
|
"@vitest/coverage-v8": "~4.0.17",
|
|
59
59
|
"ci-info": "^4.3.1",
|
|
60
60
|
"cross-env": "^10.1.0",
|
|
61
61
|
"defu": "^6.1.4",
|
|
62
|
-
"es-toolkit": "^1.
|
|
62
|
+
"es-toolkit": "^1.44.0",
|
|
63
63
|
"eslint": "^9.39.2",
|
|
64
64
|
"execa": "^9.6.1",
|
|
65
65
|
"fs-extra": "^11.3.3",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"pathe": "^2.0.3",
|
|
70
70
|
"pkg-types": "^2.3.0",
|
|
71
71
|
"rimraf": "^6.1.2",
|
|
72
|
-
"stylelint": "^
|
|
72
|
+
"stylelint": "^17.0.0",
|
|
73
73
|
"tsdown": "0.19.0",
|
|
74
74
|
"tslib": "^2.8.1",
|
|
75
75
|
"tsup": "^8.5.1",
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { execaCommand } from "execa";
|
|
2
|
+
import checkbox from "@inquirer/checkbox";
|
|
3
|
+
import input from "@inquirer/input";
|
|
4
|
+
import select from "@inquirer/select";
|
|
5
|
+
import { Command, program } from "commander";
|
|
6
|
+
|
|
1
7
|
//#region src/paths.d.ts
|
|
2
8
|
declare const packageDir: string;
|
|
3
9
|
declare const templatesDir: string;
|
|
@@ -11,6 +17,12 @@ interface PrepareAssetsOptions {
|
|
|
11
17
|
}
|
|
12
18
|
declare function prepareAssets(options?: PrepareAssetsOptions): Promise<void>;
|
|
13
19
|
//#endregion
|
|
20
|
+
//#region src/utils/command.d.ts
|
|
21
|
+
interface RunCommandOptions {
|
|
22
|
+
cwd?: string;
|
|
23
|
+
}
|
|
24
|
+
declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<void>;
|
|
25
|
+
//#endregion
|
|
14
26
|
//#region src/utils/gitignore.d.ts
|
|
15
27
|
declare function toPublishGitignorePath(input: string): string;
|
|
16
28
|
declare function toWorkspaceGitignorePath(input: string): string;
|
|
@@ -34,4 +46,4 @@ declare const templateSourceMap: Record<string, string>;
|
|
|
34
46
|
declare const templateTargetMap: Record<string, string>;
|
|
35
47
|
declare const templateMap: Record<string, string>;
|
|
36
48
|
//#endregion
|
|
37
|
-
export { TemplateChoice, assetTargets, assetsDir, createTemplateCopyFilter, getAssetTargets, isGitignoreFile, packageDir, prepareAssets, shouldSkipTemplatePath, skeletonDir, templateChoices, templateMap, templateSourceMap, templateTargetMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath };
|
|
49
|
+
export { Command, TemplateChoice, assetTargets, assetsDir, checkbox, createTemplateCopyFilter, execaCommand, getAssetTargets, input, isGitignoreFile, packageDir, prepareAssets, program, runCommand, select, shouldSkipTemplatePath, skeletonDir, templateChoices, templateMap, templateSourceMap, templateTargetMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath };
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,11 @@ import * as path$1 from "node:path";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
|
+
import { execa, execaCommand } from "execa";
|
|
6
|
+
import checkbox from "@inquirer/checkbox";
|
|
7
|
+
import input from "@inquirer/input";
|
|
8
|
+
import select from "@inquirer/select";
|
|
9
|
+
import { Command, program } from "commander";
|
|
5
10
|
|
|
6
11
|
//#region assets-data.mjs
|
|
7
12
|
const coreAssetTargets = [
|
|
@@ -103,14 +108,14 @@ const assetsDir = path$1.join(packageDir, "assets");
|
|
|
103
108
|
//#region src/utils/gitignore.ts
|
|
104
109
|
const publishBasename = "gitignore";
|
|
105
110
|
const workspaceBasename = ".gitignore";
|
|
106
|
-
function detectSeparator(input) {
|
|
107
|
-
if (input.includes("\\") && !input.includes("/")) return "\\";
|
|
111
|
+
function detectSeparator(input$1) {
|
|
112
|
+
if (input$1.includes("\\") && !input$1.includes("/")) return "\\";
|
|
108
113
|
return "/";
|
|
109
114
|
}
|
|
110
|
-
function replaceBasename(input, from, to) {
|
|
111
|
-
if (!input) return input;
|
|
112
|
-
const separator = detectSeparator(input);
|
|
113
|
-
const normalized = input.replace(/[\\/]/g, separator);
|
|
115
|
+
function replaceBasename(input$1, from, to) {
|
|
116
|
+
if (!input$1) return input$1;
|
|
117
|
+
const separator = detectSeparator(input$1);
|
|
118
|
+
const normalized = input$1.replace(/[\\/]/g, separator);
|
|
114
119
|
const hasTrailingSeparator = normalized.endsWith(separator);
|
|
115
120
|
const segments = normalized.split(separator);
|
|
116
121
|
if (hasTrailingSeparator && segments[segments.length - 1] === "") segments.pop();
|
|
@@ -120,13 +125,13 @@ function replaceBasename(input, from, to) {
|
|
|
120
125
|
const rebuilt = segments.join(separator);
|
|
121
126
|
return hasTrailingSeparator ? `${rebuilt}${separator}` : rebuilt;
|
|
122
127
|
}
|
|
123
|
-
return input;
|
|
128
|
+
return input$1;
|
|
124
129
|
}
|
|
125
|
-
function toPublishGitignorePath(input) {
|
|
126
|
-
return replaceBasename(input, workspaceBasename, publishBasename);
|
|
130
|
+
function toPublishGitignorePath(input$1) {
|
|
131
|
+
return replaceBasename(input$1, workspaceBasename, publishBasename);
|
|
127
132
|
}
|
|
128
|
-
function toWorkspaceGitignorePath(input) {
|
|
129
|
-
return replaceBasename(input, publishBasename, workspaceBasename);
|
|
133
|
+
function toWorkspaceGitignorePath(input$1) {
|
|
134
|
+
return replaceBasename(input$1, publishBasename, workspaceBasename);
|
|
130
135
|
}
|
|
131
136
|
function isGitignoreFile(name) {
|
|
132
137
|
return toPublishGitignorePath(name) !== name || toWorkspaceGitignorePath(name) !== name;
|
|
@@ -274,6 +279,15 @@ async function prepareAssets(options = {}) {
|
|
|
274
279
|
await copyTemplates(repoRoot, overwriteExisting);
|
|
275
280
|
}
|
|
276
281
|
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/utils/command.ts
|
|
284
|
+
async function runCommand(command, args, options = {}) {
|
|
285
|
+
await execa(command, args, {
|
|
286
|
+
stdio: "inherit",
|
|
287
|
+
...options
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
277
291
|
//#endregion
|
|
278
292
|
//#region src/index.ts
|
|
279
293
|
const templateChoices = templateChoices$1;
|
|
@@ -284,4 +298,4 @@ const templateTargetMap = Object.fromEntries(templateChoices.map((item) => [item
|
|
|
284
298
|
const templateMap = templateSourceMap;
|
|
285
299
|
|
|
286
300
|
//#endregion
|
|
287
|
-
export { assetTargets, assetsDir, createTemplateCopyFilter, getAssetTargets, isGitignoreFile, packageDir, prepareAssets, shouldSkipTemplatePath, skeletonDir, templateChoices, templateMap, templateSourceMap, templateTargetMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath };
|
|
301
|
+
export { Command, assetTargets, assetsDir, checkbox, createTemplateCopyFilter, execaCommand, getAssetTargets, input, isGitignoreFile, packageDir, prepareAssets, program, runCommand, select, shouldSkipTemplatePath, skeletonDir, templateChoices, templateMap, templateSourceMap, templateTargetMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo-templates",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"description": "Template assets for icebreaker monorepo scaffolding",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,12 +39,20 @@
|
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=18.0.0"
|
|
41
41
|
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@inquirer/checkbox": "^5.0.4",
|
|
44
|
+
"@inquirer/input": "^5.0.4",
|
|
45
|
+
"@inquirer/select": "^5.0.4",
|
|
46
|
+
"commander": "^14.0.2",
|
|
47
|
+
"execa": "^9.6.1"
|
|
48
|
+
},
|
|
42
49
|
"publishConfig": {
|
|
43
50
|
"access": "public"
|
|
44
51
|
},
|
|
45
52
|
"scripts": {
|
|
46
53
|
"dev": "tsdown --watch --sourcemap",
|
|
47
54
|
"build": "tsdown",
|
|
55
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
48
56
|
"sync:assets": "node scripts/sync-assets.mjs",
|
|
49
57
|
"lint": "eslint ."
|
|
50
58
|
}
|
package/skeleton/package.json
CHANGED
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"@icebreakers/monorepo": "workspace:*",
|
|
54
54
|
"@icebreakers/stylelint-config": "^1.2.5",
|
|
55
55
|
"@types/fs-extra": "^11.0.4",
|
|
56
|
-
"@types/node": "^25.0.
|
|
56
|
+
"@types/node": "^25.0.9",
|
|
57
57
|
"@types/semver": "^7.7.1",
|
|
58
58
|
"@vitest/coverage-v8": "~4.0.17",
|
|
59
59
|
"ci-info": "^4.3.1",
|
|
60
60
|
"cross-env": "^10.1.0",
|
|
61
61
|
"defu": "^6.1.4",
|
|
62
|
-
"es-toolkit": "^1.
|
|
62
|
+
"es-toolkit": "^1.44.0",
|
|
63
63
|
"eslint": "^9.39.2",
|
|
64
64
|
"execa": "^9.6.1",
|
|
65
65
|
"fs-extra": "^11.3.3",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"pathe": "^2.0.3",
|
|
70
70
|
"pkg-types": "^2.3.0",
|
|
71
71
|
"rimraf": "^6.1.2",
|
|
72
|
-
"stylelint": "^
|
|
72
|
+
"stylelint": "^17.0.0",
|
|
73
73
|
"tsdown": "0.19.0",
|
|
74
74
|
"tslib": "^2.8.1",
|
|
75
75
|
"tsup": "^8.5.1",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@faker-js/faker": "^10.2.0",
|
|
18
|
-
"@tanstack/vue-query": "^5.92.
|
|
18
|
+
"@tanstack/vue-query": "^5.92.7",
|
|
19
19
|
"@tanstack/vue-query-devtools": "^6.1.3",
|
|
20
20
|
"@tanstack/vue-table": "^8.21.3",
|
|
21
21
|
"@tanstack/vue-virtual": "^3.13.18",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"vue-router": "^4.6.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@cloudflare/vite-plugin": "^1.
|
|
32
|
+
"@cloudflare/vite-plugin": "^1.21.0",
|
|
33
33
|
"@hono/node-server": "^1.19.9",
|
|
34
34
|
"@hono/trpc-server": "^0.4.2",
|
|
35
35
|
"@tailwindcss/vite": "^4.1.18",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"vite-plugin-vue-devtools": "^8.0.5",
|
|
47
47
|
"vite-tsconfig-paths": "^6.0.4",
|
|
48
48
|
"vue-tsc": "3.2.2",
|
|
49
|
-
"wrangler": "^4.59.
|
|
49
|
+
"wrangler": "^4.59.2",
|
|
50
50
|
"zod": "^4.3.5"
|
|
51
51
|
}
|
|
52
52
|
}
|