create-fcdev 0.3.0 → 0.4.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/package.json +1 -6
- package/src/index.mjs +3 -3
- package/templates/nes-asm/README.md +1 -1
- package/templates/nes-asm/template.json +3 -1
- package/templates/nes-c/README.md +1 -1
- package/templates/nes-c/template.json +3 -1
- package/templates/sb2000-asm/template.json +3 -1
- package/templates/sb2000-c/template.json +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-fcdev",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "创建 fcdev 项目:npm create fcdev,在空目录生成 6502 兼容机程序的开发结构与示例",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "sungbin <sungbin@3578.cn>",
|
|
@@ -12,11 +12,6 @@
|
|
|
12
12
|
"sb2000",
|
|
13
13
|
"create"
|
|
14
14
|
],
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://gitee.com/sungbin/fcdev.git",
|
|
18
|
-
"directory": "packages/create-fcdev"
|
|
19
|
-
},
|
|
20
15
|
"type": "module",
|
|
21
16
|
"engines": {
|
|
22
17
|
"node": ">=22"
|
package/src/index.mjs
CHANGED
|
@@ -52,8 +52,8 @@ const LANGUAGE_LABELS = { c: 'C 语言(cc65)', asm: '汇编(ca65)' };
|
|
|
52
52
|
*/
|
|
53
53
|
export function runCommandInTerminal(command, args, cwd) {
|
|
54
54
|
return new Promise((resolve, reject) => {
|
|
55
|
-
//
|
|
56
|
-
const child = spawn(command, args, { cwd, stdio: 'inherit', shell:
|
|
55
|
+
// npm 在 Windows 上是 .cmd 文件,必须经 shell 启动;参数都是固定值
|
|
56
|
+
const child = spawn(command, args, { cwd, stdio: 'inherit', shell: true });
|
|
57
57
|
child.once('error', reject);
|
|
58
58
|
child.once('close', (code) => resolve(code ?? 1));
|
|
59
59
|
});
|
|
@@ -130,7 +130,7 @@ export async function runCreate(argv, context) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
const relative = path.relative(context.cwd, directory);
|
|
133
|
-
context.stdout.write(`\n下一步:\n${relative === '' ? '' : ` cd ${relative}\n`}${args.install ? '' : ' npm install
|
|
133
|
+
context.stdout.write(`\n下一步:\n${relative === '' ? '' : ` cd ${relative}\n`}${args.install ? '' : ' npm install 安装依赖\n npm run sync 生成 IDE 配置\n'}`);
|
|
134
134
|
for (const note of template.notes) context.stdout.write(`${note}\n`);
|
|
135
135
|
return 0;
|
|
136
136
|
} catch (error) {
|
|
@@ -18,4 +18,4 @@ npm start # 在模拟器里运行(只支持 Windows)
|
|
|
18
18
|
|
|
19
19
|
## 文档
|
|
20
20
|
|
|
21
|
-
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES
|
|
21
|
+
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置。
|
|
@@ -18,4 +18,4 @@ npm start # 在模拟器里运行(只支持 Windows)
|
|
|
18
18
|
|
|
19
19
|
## 文档
|
|
20
20
|
|
|
21
|
-
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES
|
|
21
|
+
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置。
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
"disk": "fcdev disk src"
|
|
7
7
|
},
|
|
8
8
|
"notes": [
|
|
9
|
+
" npm run build 生成 build/sb2000/HELLO.EXE",
|
|
9
10
|
" npm run disk 生成软盘镜像 build/sb2000/HELLO.img",
|
|
10
11
|
" npm start 在模拟器里运行(只支持 Windows):先在 fcdev.json 里用 firmware 指定 SB2000 的 BIOS 文件,",
|
|
11
|
-
" DOS 启动后按两次回车跳过日期与时间,再输入 hello"
|
|
12
|
+
" DOS 启动后按两次回车跳过日期与时间,再输入 hello",
|
|
13
|
+
" npx fcdev docs 查开发文档"
|
|
12
14
|
]
|
|
13
15
|
}
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
"disk": "fcdev disk src"
|
|
7
7
|
},
|
|
8
8
|
"notes": [
|
|
9
|
+
" npm run build 生成 build/sb2000/HELLO.EXE",
|
|
9
10
|
" npm run disk 生成软盘镜像 build/sb2000/HELLO.img",
|
|
10
11
|
" npm start 在模拟器里运行(只支持 Windows):先在 fcdev.json 里用 firmware 指定 SB2000 的 BIOS 文件,",
|
|
11
|
-
" DOS 启动后按两次回车跳过日期与时间,再输入 hello"
|
|
12
|
+
" DOS 启动后按两次回车跳过日期与时间,再输入 hello",
|
|
13
|
+
" npx fcdev docs 查开发文档",
|
|
14
|
+
" npx fcdev api 查 SB2000 的 C 函数接口"
|
|
12
15
|
]
|
|
13
16
|
}
|