@dianzhong/create-harness-app 0.1.1 → 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.
Files changed (2) hide show
  1. package/README.md +68 -0
  2. package/package.json +1 -1
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@dianzhong/create-harness-app",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "点众前端项目初始化器:封装 create-vue,叠加 UI 库、axios 层与 AI Harness 治理体系",
5
5
  "type": "module",
6
6
  "bin": {