create-genshin-ts 0.1.9 → 0.1.10

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-genshin-ts",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Create a Genshin-TS project",
5
5
  "type": "module",
6
6
  "author": "josStorer <josstorer@outlook.com> (https://github.com/josStorer)",
@@ -14,6 +14,7 @@ Docs: `https://gsts.moe`
14
14
  ## Project Layout
15
15
 
16
16
  - `src/main.ts`: entry example (`g.server(...).on(...)`)
17
+ - `src/resources/signals.ts`: generated signal definitions when `inject` is configured
17
18
  - `gsts.config.ts`: compile/output configuration
18
19
  - `dist/`: build outputs (`.gs.ts` / `.json` / `.gia`)
19
20
  - `docs/EDITOR_BOUNDARIES.md`: English code-vs-editor responsibility guide
@@ -176,7 +177,9 @@ Math and vectors:
176
177
  - `Mathf.*` / `Vector3.*` / `Random.*`: Unity-style APIs.
177
178
 
178
179
  Signals and events:
179
- - `send('signalName')` with `g.server().onSignal(...)`.
180
+ - String usage works: `send('signalName')` with `g.server().onSignal('signalName', ...)`.
181
+ - Prefer extracted definitions: `send(Signal.xxx, ...)` and `g.server().onSignal(Signal.xxx, ...)`.
182
+ - `Signal.xxx` comes from `src/resources/signals.ts` and enables parameter type checks.
180
183
 
181
184
  Timers:
182
185
  - `setTimeout` / `setInterval` / `clearTimeout` / `clearInterval`.
@@ -14,6 +14,7 @@ npm run dev
14
14
  ## 项目结构
15
15
 
16
16
  - `src/main.ts`:入口示例(`g.server(...).on(...)`)
17
+ - `src/resources/signals.ts`:配置 `inject` 后生成的信号定义
17
18
  - `gsts.config.ts`:编译与输出配置
18
19
  - `dist/`:编译产物(`.gs.ts` / `.json` / `.gia`)
19
20
  - `docs/EDITOR_BOUNDARIES.md`:英文版代码与编辑器职责边界说明
@@ -186,7 +187,9 @@ g.server({
186
187
 
187
188
  信号与事件:
188
189
 
189
- - `send('signalName')` 发送信号,配合 `g.server().onSignal(...)` 监听。
190
+ - 字符串写法可用:`send('signalName')` 配合 `g.server().onSignal('signalName', ...)`。
191
+ - 推荐使用提取定义:`send(Signal.xxx, ...)` 和 `g.server().onSignal(Signal.xxx, ...)`。
192
+ - `Signal.xxx` 来自 `src/resources/signals.ts`,可获得参数类型检查。
190
193
 
191
194
  定时器:
192
195