@hagicode/hagi18n 0.1.0-dev.1.1.45d0d2f → 0.1.0-dev.11.1.2672d5a
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/LICENSE +21 -0
- package/README.md +35 -6
- package/README_cn.md +27 -6
- package/dist/cli.js +32 -15
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.js +37 -5
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/locale-name.d.ts +1 -0
- package/dist/locale-name.js +26 -0
- package/dist/locale-name.js.map +1 -0
- package/dist/locale-toolkit.d.ts +7 -1
- package/dist/locale-toolkit.js +109 -30
- package/dist/locale-toolkit.js.map +1 -1
- package/package.json +4 -2
- package/skills/hagi18n/SKILL.md +39 -0
- package/skills/hagi18n/agents/openai.yaml +7 -0
- package/skills/hagi18n/references/cli-workflows.md +62 -0
- package/skills/hagi18n/references/config-and-layout.md +116 -0
- package/skills/hagi18n/references/development-and-validation.md +50 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Development And Validation
|
|
2
|
+
|
|
3
|
+
## Repository-local commands
|
|
4
|
+
|
|
5
|
+
Run these from `repos/hagi18n`:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm test
|
|
9
|
+
npm run build
|
|
10
|
+
npm run lint
|
|
11
|
+
npm run pack:check
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Useful package maintenance helpers:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run publish:check-prereqs
|
|
18
|
+
npm run publish:prepare-dev-version
|
|
19
|
+
npm run publish:verify-release
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Source map
|
|
23
|
+
|
|
24
|
+
- `src/cli.ts`: command registration, option parsing, summary output, and exit code wiring
|
|
25
|
+
- `src/config.ts`: config discovery, YAML parsing, defaults, doctor rules, and config resolution
|
|
26
|
+
- `src/locale-toolkit.ts`: file walking, YAML reads, placeholder checks, doctor scanning, and mutation planning
|
|
27
|
+
- `src/index.ts`: public exports for API consumers
|
|
28
|
+
- `src/__tests__/`: CLI, config, index, and locale toolkit coverage
|
|
29
|
+
|
|
30
|
+
## Packaging notes
|
|
31
|
+
|
|
32
|
+
- Published files are controlled by `package.json`.
|
|
33
|
+
- When adding AI-facing skill content or other runtime-relevant docs, keep package contents aligned with the `files` allowlist.
|
|
34
|
+
- The package is ESM and exports the CLI binary from `dist/cli.js`.
|
|
35
|
+
|
|
36
|
+
## Validation expectations after edits
|
|
37
|
+
|
|
38
|
+
- Run the narrowest relevant tests first if the change is isolated.
|
|
39
|
+
- Run `npm test` after source or skill-related packaging changes.
|
|
40
|
+
- Run `npm run build` after TypeScript or export changes.
|
|
41
|
+
- Run `npm run pack:check` when package contents or publish-facing files change.
|
|
42
|
+
|
|
43
|
+
## Behavior references
|
|
44
|
+
|
|
45
|
+
The package preserves the Web maintenance model:
|
|
46
|
+
|
|
47
|
+
- `repos/web/buildTools/lib/i18nLocaleToolkit.mjs` -> `src/locale-toolkit.ts`
|
|
48
|
+
- `repos/web/buildTools/i18n-locale-cli.mjs` -> `src/cli.ts`
|
|
49
|
+
|
|
50
|
+
Use the local source tree as the writable source of truth and treat the Web mapping as historical context only.
|