@66rpg/cgmaker 0.1.16 → 0.1.17
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 +2 -2
- package/skill/cgmaker/SKILL.md +5 -0
- package/skill/cgmaker-identity/SKILL.md +2 -0
- package/skill/cgmaker-identity/references/branches.md +5 -0
- package/skill/cgmaker-template-spec/SKILL.md +2 -0
- package/skill/cgmaker-template-spec/references/dist.md +1 -1
- package/skill/cgmaker-template-spec/references/layout.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@66rpg/cgmaker",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "橙光 cgmaker 平台工具:validate-template(TS);login / publish 等转发 cgmaker",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"picocolors": "^1.1.1"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@66rpg/cgmaker-win32-x64": "0.1.
|
|
36
|
+
"@66rpg/cgmaker-win32-x64": "0.1.17"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.15.0",
|
package/skill/cgmaker/SKILL.md
CHANGED
|
@@ -39,6 +39,11 @@ description: 登录橙光托管平台,发布静态游戏、模板或开源工
|
|
|
39
39
|
- `--from-dir` 的 origin 为 `local`,不能 `publish-template`。
|
|
40
40
|
- 不要把试玩当成同一 `game_id` 的第二个通道。首发可以只发试玩;后补正式版会自动挂接。
|
|
41
41
|
|
|
42
|
+
## 发布前请确认
|
|
43
|
+
|
|
44
|
+
- **发模板或开源工程**:上传的是源码,**不含** `node_modules`。别人从平台拿到工程后,必须能按 `package.json` 把依赖装上。依赖须是公开可装的包、版本号真实存在(不要写只有你电脑上才有的包、未发布的私有包、或装不到的版本)。装不上就先改依赖再发。
|
|
45
|
+
- **发模板、游戏或开源工程**:运行时**不能用在线资源**(CDN 图片、远程字体、外链脚本/样式、热链网上的音视频等)。图、音、字体、文案、数据都用工程里的本地文件:模板和开源工程放在 `assets/` 或源码内;游戏须打进 `dist/`。发现外链,先改成本地再发。
|
|
46
|
+
|
|
42
47
|
## 按业务选命令
|
|
43
48
|
|
|
44
49
|
从模板开工程(用户还没有目录):
|
|
@@ -41,3 +41,5 @@ description: 模板与游戏的参数与标识配置指南。帮助用户理解
|
|
|
41
41
|
- 模板工程一旦发布并在实际项目中使用,请勿更改 `package.json` 中的 `slug`。
|
|
42
42
|
- 模板 `--version` / `package.json.version`(接口 `version_name`)须 1–16 位,仅小写字母、数字、`.`、`-`;须以字母或数字开头和结尾,不能有连续符号。不合法则拒绝发布。游戏 / 开源工程 / `--data-ver` 不套此规则。细则见 [references/fields.md](references/fields.md)。
|
|
43
43
|
- 素材版本号(`--data-ver`)不会由平台自动加 1,每次更新素材时请根据规划显式指定。
|
|
44
|
+
- **发模板或开源工程前**:上传的是源码、不含 `node_modules`。请确认 `package.json` 里的依赖都能在常规 npm 源装到,版本号真实可用;不要写只有本机才有的包或装不到的版本。
|
|
45
|
+
- **发模板、游戏或开源工程前**:运行时请只用本地资源(图、音、字体、文案、数据放在工程内;游戏打进 `dist/`),不要用 CDN 或其它在线地址。
|
|
@@ -52,3 +52,5 @@ npx cgmaker publish-template-data --data-ver 2 --assets C:\path\to\assets
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
过不过关只认 `cgmaker validate-template`。发布游戏用 `npx cgmaker publish`(只认 `dist/`);试玩用 `npx cgmaker publish --demo`(先 `build:demo`,可无正式版首发)。命令怎么敲见 `cgmaker`;功能参数与场景搭配见 `cgmaker-identity`。上传素材时没写 `--data-ver` 会问你(可沿用 `package.json` 里的号,不会自动 +1);没法提问时必须自己写上或保证 `package.json` 已有 `data_ver`。`--data-summary` 可选,空则不写接口。`publish-template` 与 `publish-template-data` 都可用 `--assets` 指定素材目录的完整路径(传上去以后包里仍然叫 `assets/`)。
|
|
55
|
+
|
|
56
|
+
发布模板或开源工程前:zip 不含 `node_modules`,`package.json` 里的依赖必须能装、版本必须真实可用。发布模板、游戏或开源工程前:运行时只用本地资源,不要热链 CDN 或其它在线地址。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
`npx cgmaker publish` 上传正式版;`npx cgmaker publish --demo` 上传试玩。两次都只认当前 `dist/`。
|
|
8
8
|
|
|
9
|
-
入口按 **通用首页 → 启动页 / 方向首页 → 游戏页** 拆 HTML。所有 HTML 的脚本/样式必须是相对路径(Vite `base: './'`),禁止 `src="/assets/..."`(那是站点根路径,不是源码里的内容目录 `assets/`)。打包器必须 `base: './'
|
|
9
|
+
入口按 **通用首页 → 启动页 / 方向首页 → 游戏页** 拆 HTML。所有 HTML 的脚本/样式必须是相对路径(Vite `base: './'`),禁止 `src="/assets/..."`(那是站点根路径,不是源码里的内容目录 `assets/`)。打包器必须 `base: './'`。脚本、样式、字体、图片一律打进 `dist/` 的本地文件,禁止运行时再去拉 CDN 或其它在线地址。目录只能叫 `dist/`,不要 `build/` / `out/` / `www/`。Vite 可用 `publicDir: "assets"`,避免和 hashed 文件抢 `dist/assets/`。
|
|
10
10
|
|
|
11
11
|
✅ 必有 · ⭕ 可选。
|
|
12
12
|
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
- 根目录 `data/`、`theme/`(进 `assets/`)
|
|
52
52
|
- `template.yaml` / `template.yml`(身份在 `package.json` 的 `slug`)
|
|
53
53
|
- 产物目录叫 `build/`、`out/`、`www/`(要发静态站只能是 `dist/`)
|
|
54
|
-
-
|
|
54
|
+
- 运行时热链远程素材(CDN 图、远程字体、外链脚本/样式、网上音视频等);图、音、字体、文案、数据一律用本地 `assets/` 或打进 `dist/` 的文件
|
|
55
55
|
- 模板根目录 `scripts/` 文件夹(和 npm scripts、`skill/scripts/` 撞车)
|
|
56
56
|
- `package.json` 设置 `bin`、写 `"packageManager"`
|
|
57
57
|
- 作者工程依赖 `@66rpg/cgmaker-template-*`(create 只拷源码)
|
|
58
58
|
|
|
59
|
-
`devDependencies` 必须有 `@66rpg/cgmaker`(脚手架写入;模板 zip 也应带上)。本仓库 `templates/` 下的样板永久 `private`,不是 npm
|
|
59
|
+
`devDependencies` 必须有 `@66rpg/cgmaker`(脚手架写入;模板 zip 也应带上)。本仓库 `templates/` 下的样板永久 `private`,不是 npm 商品。模板 zip **不含** `node_modules`:`dependencies` / `devDependencies` 必须是别人按 `package.json` 能装到的公开包,版本号须真实存在。
|
|
60
60
|
|
|
61
61
|
## package.json
|
|
62
62
|
|