uxos 0.0.3 → 0.0.5
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/cli.js +9 -3
- package/package.json +1 -1
- package/workflows/init.md +3 -3
package/cli.js
CHANGED
|
@@ -7,14 +7,20 @@ const targetDir = process.cwd();
|
|
|
7
7
|
const packageJson = require(path.join(__dirname, 'package.json'));
|
|
8
8
|
const version = packageJson.version;
|
|
9
9
|
|
|
10
|
+
// 支持无参数或 'install' 子命令
|
|
11
|
+
const command = process.argv[2];
|
|
12
|
+
if (command && command !== 'install' && command !== 'i') {
|
|
13
|
+
console.error(`Unknown command: ${command}`);
|
|
14
|
+
console.error(`Usage: npx uxos [install|i]`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
// 拷贝所有文件到项目目录
|
|
11
19
|
const copyFiles = [
|
|
12
20
|
['config/user-template.yaml', 'config/user-template.yaml'],
|
|
13
21
|
['workflows/init.md', 'workflows/init.md'],
|
|
14
22
|
['workflows/step1.md', 'workflows/step1.md'],
|
|
15
|
-
['workflows/step2.md', 'workflows/step2.md'],
|
|
16
23
|
['templates/test-template.md', 'templates/test-template.md'],
|
|
17
|
-
['templates/test2-template.md', 'templates/test2-template.md'],
|
|
18
24
|
];
|
|
19
25
|
|
|
20
26
|
copyFiles.forEach(([src, dest]) => {
|
|
@@ -31,4 +37,4 @@ copyFiles.forEach(([src, dest]) => {
|
|
|
31
37
|
});
|
|
32
38
|
|
|
33
39
|
// 纯执行指令,无额外说明
|
|
34
|
-
console.log(`
|
|
40
|
+
console.log(`UXOS_BOOTSTRAP: DO NOT REPLY. OPEN workflows/init.md, FOLLOW IT EXACTLY, AND SEND ONLY THE GREETING BLOCK VERBATIM.`);
|
package/package.json
CHANGED
package/workflows/init.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
OUTPUT THE FOLLOWING BLOCK, THEN IMMEDIATELY EXECUTE THE TASKS:
|
|
2
2
|
|
|
3
3
|
████████████ UXOS ████████████
|
|
4
4
|
欢迎 uxos!uxos 是一套快速初始化工具,可以帮助你在几秒钟内完成项目基础配置。现在让我带你完成初始化配置,大约 1-2 分钟。
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
现在执行以下任务:
|
|
7
7
|
1. 收集:昵称、语言
|
|
8
8
|
2. 更新 config/user-template.yaml
|
|
9
|
-
3. 读取
|
|
9
|
+
3. 读取 ./step1.md
|