scrum-skills 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.
@@ -17,12 +17,14 @@ import { spawnSync } from 'node:child_process';
17
17
  import { fileURLToPath } from 'node:url';
18
18
 
19
19
  const PKG_ROOT = fileURLToPath(new URL('..', import.meta.url));
20
+ const VERSION = JSON.parse(readFileSync(join(PKG_ROOT, 'package.json'), 'utf8')).version;
20
21
  const HELP = `用法:
21
22
  scrum-skills init [dir] [--force] 初始化敏捷开发文件到目标文件夹(默认当前目录)
22
23
  scrum-skills update [dir] [--dry-run] 更新已初始化项目的 skill 框架文件(不碰 agile/ 数据)
23
24
  scrum-skills serve [dir] [port] 启动可视化 server(默认当前目录,端口 4173)
24
25
  scrum-skills validate [dir] 校验敏捷数据(默认当前目录)
25
- scrum-skills help 显示本帮助`;
26
+ scrum-skills help 显示本帮助
27
+ scrum-skills -v / --version 显示版本号`;
26
28
 
27
29
  const [cmd, ...args] = process.argv.slice(2);
28
30
  const fail = msg => { console.error(`✘ ${msg}`); process.exit(1); };
@@ -131,6 +133,8 @@ switch (cmd) {
131
133
  case 'validate': runTool('validate.mjs', false); break;
132
134
  case 'help': case '-h': case '--help': case undefined:
133
135
  console.log(HELP); break;
136
+ case '-v': case '--version': case 'version':
137
+ console.log(VERSION); break;
134
138
  default:
135
139
  console.error(`未知命令: ${cmd}\n`);
136
140
  console.log(HELP);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scrum-skills",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "结构化敏捷开发管理 skills + CLI:AI 对话产出结构化敏捷数据,TDD 驱动实施,数据可视化看板",
5
5
  "type": "module",
6
6
  "bin": {