@dianzhong/create-harness-app 0.1.0 → 0.1.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/README.md +68 -0
- package/package.json +17 -5
- package/templates/harness/full/skills-lock.json +0 -35
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @dianzhong/create-harness-app
|
|
2
|
+
|
|
3
|
+
点众科技前端脚手架。一条命令初始化符合团队规范的 Vue 3 项目。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm create @dianzhong/harness-app my-app
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 包含内容
|
|
10
|
+
|
|
11
|
+
基于 [create-vue](https://github.com/vuejs/create-vue) 骨架,叠加:
|
|
12
|
+
|
|
13
|
+
| 层 | 内容 |
|
|
14
|
+
|---|---|
|
|
15
|
+
| **TypeScript + ESLint** | create-vue 默认配置 |
|
|
16
|
+
| **UI 组件库** | Element Plus / Ant Design Vue / 跳过(可选) |
|
|
17
|
+
| **axios 请求层** | 封装好的 `request.ts`、token 管理、统一错误处理 |
|
|
18
|
+
| **AI Harness** | Claude Code hooks(guard-tool + quality-gate)、rules、agents、skills |
|
|
19
|
+
|
|
20
|
+
## 用法
|
|
21
|
+
|
|
22
|
+
### 交互模式
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm create @dianzhong/harness-app my-app
|
|
26
|
+
# 按提示选择 UI 库、是否集成 axios、Harness 级别
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 非交互模式(CI / 快速初始化)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 全部默认:TS + Router + Pinia + Element Plus + axios + Harness Full
|
|
33
|
+
npm create @dianzhong/harness-app my-app -- --yes
|
|
34
|
+
|
|
35
|
+
# 自定义
|
|
36
|
+
npm create @dianzhong/harness-app my-app -- --ui=ant-design-vue --harness=minimal
|
|
37
|
+
npm create @dianzhong/harness-app my-app -- --ui=none --harness=none --no-axios
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 参数
|
|
41
|
+
|
|
42
|
+
| 参数 | 说明 | 默认值 |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `--yes` | 非交互,全部使用默认值 | — |
|
|
45
|
+
| `--ui=<lib>` | `element-plus` \| `ant-design-vue` \| `none` | `element-plus` |
|
|
46
|
+
| `--harness=<level>` | `full` \| `minimal` \| `none` | `full` |
|
|
47
|
+
| `--no-axios` | 跳过 axios 请求层 | — |
|
|
48
|
+
| `--vitest` | 启用 Vitest | — |
|
|
49
|
+
|
|
50
|
+
## 初始化后
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd my-app
|
|
54
|
+
pnpm install
|
|
55
|
+
pnpm harness:sync # 计算 skills 指纹(harness:full 时)
|
|
56
|
+
pnpm dev
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Harness 级别说明
|
|
60
|
+
|
|
61
|
+
- **full** — 完整治理:Claude Code hooks、rules、agents、skills、commit lint、husky、oxlint
|
|
62
|
+
- **minimal** — 轻量守护:guard-tool(阻止危险操作)+ quality-gate(Stop 时自动格式化 + 类型检查)
|
|
63
|
+
- **none** — 不集成,纯 create-vue 骨架 + axios/UI 叠加
|
|
64
|
+
|
|
65
|
+
## 要求
|
|
66
|
+
|
|
67
|
+
- Node.js `^20.19.0 || >=22.12.0`
|
|
68
|
+
- pnpm(推荐)或 npm / yarn
|
package/package.json
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dianzhong/create-harness-app",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "点众前端项目初始化器:封装 create-vue,叠加 UI 库、axios 层与 AI Harness 治理体系",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-harness-app": "dist/index.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"templates/"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"create-vue",
|
|
18
|
+
"scaffold",
|
|
19
|
+
"harness",
|
|
20
|
+
"vue3"
|
|
21
|
+
],
|
|
10
22
|
"license": "MIT",
|
|
11
23
|
"scripts": {
|
|
12
24
|
"build": "tsup",
|
|
@@ -1,46 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"skills": {
|
|
4
|
-
"element-plus-vue3": {
|
|
5
|
-
"source": "partme-ai/full-stack-skills",
|
|
6
|
-
"sourceType": "github",
|
|
7
|
-
"computedHash": "a2d4fa311bdce8b6e914ad5a84b9e6a1985a8df59a94aae8259b7aff7a3db41e"
|
|
8
|
-
},
|
|
9
4
|
"find-skills": {
|
|
10
5
|
"source": "anthropics/skills",
|
|
11
6
|
"sourceType": "github",
|
|
12
7
|
"computedHash": "c6bcd076436f910c67f591a5a83f8e6182a2b71d22a686084854fe9924324567"
|
|
13
8
|
},
|
|
14
|
-
"frontend-design": {
|
|
15
|
-
"source": "anthropics/claude-code",
|
|
16
|
-
"sourceType": "github",
|
|
17
|
-
"computedHash": "514ce855a27bfcf4e883a46fc02c68a3bc9cd8571a2d3fe5ac1aa93cde008433"
|
|
18
|
-
},
|
|
19
|
-
"openspec-apply-change": {
|
|
20
|
-
"source": "project-local",
|
|
21
|
-
"sourceType": "local",
|
|
22
|
-
"computedHash": "b0d3d68a1782fd8fd9c5b54c057461079bbdf8d8d597be2d2dc0d990f5f5509d"
|
|
23
|
-
},
|
|
24
|
-
"openspec-archive-change": {
|
|
25
|
-
"source": "project-local",
|
|
26
|
-
"sourceType": "local",
|
|
27
|
-
"computedHash": "cef47988c2959dbd2967efd2553bc94dc01178cffc76ae39c2d841eb4d5e6326"
|
|
28
|
-
},
|
|
29
|
-
"openspec-explore": {
|
|
30
|
-
"source": "partme-ai/full-stack-skills",
|
|
31
|
-
"sourceType": "github",
|
|
32
|
-
"computedHash": "7f84a20d2e1c238585bce57750d498c18d52ad7be6f2842f486bbdd074c29cf7"
|
|
33
|
-
},
|
|
34
|
-
"openspec-propose": {
|
|
35
|
-
"source": "project-local",
|
|
36
|
-
"sourceType": "local",
|
|
37
|
-
"computedHash": "5f1b30ef0e2134741b29affd8c5815d4e66d36bcf9404034bdb056bb6c25e405"
|
|
38
|
-
},
|
|
39
|
-
"project-structure-guard": {
|
|
40
|
-
"source": "project-local",
|
|
41
|
-
"sourceType": "local",
|
|
42
|
-
"computedHash": "bae2ec47defeae0d996fca6c05bce6d138ec31909bf0625ecc942926491fca72"
|
|
43
|
-
},
|
|
44
9
|
"vue-best-practices": {
|
|
45
10
|
"source": "moeru-ai/airi",
|
|
46
11
|
"sourceType": "github",
|