docs: migrate README.md / README.zh_CN.md to a single NRG template#139
docs: migrate README.md / README.zh_CN.md to a single NRG template#139andriishin wants to merge 1 commit into
Conversation
Replaces the two hand-maintained READMEs with a single README.src.md, regenerated by nrg-maven-plugin during the compile phase. Both outputs are byte-identical to the originals (modulo a 2-line auto-generated header NRG injects at the top). The Chinese filename README.zh_CN.md is produced by declaring the language as zh_CN — NRG's default output pattern <base>.<lang>.md yields the right name directly, no override needed.
|
I have read the CLA Document and I hereby sign the CLA alexander.andriishin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #139 +/- ##
=====================================================
- Coverage 85.86041% 85.83954% -0.02088%
+ Complexity 4325 4318 -7
=====================================================
Files 436 436
Lines 14371 14371
Branches 1286 1286
=====================================================
- Hits 12339 12336 -3
- Misses 2032 2035 +3 🚀 New features to boost your workflow:
|
|
Closing this — the Tencent CLA requirement is broader than I want to commit to in exchange for a docs-only contribution. If a maintainer would like the NRG migration applied internally without going through the CLA path, the template and pom snippet are at https://github.com/andriishin/trpc-java/tree/nrg-migration. Thanks! |
Why
README.mdandREADME.zh_CN.mdare hand-maintained side-by-side. Every README change means editing the same paragraph in two places.This PR migrates both files to a single source-of-truth template using Nanolaba Readme Generator (NRG) — a small Java 8 Maven plugin that turns one
README.src.mdinto N localized README files on every build.What changes
README.src.md— the unified source. Each line is tagged<!--en-->or<!--zh_CN-->. Generated programmatically; outputs are byte-identical to today's files (modulo a 2-line auto-generated header).pom.xml— addscom.nanolaba:nrg-maven-plugin:1.1to the parent POM's<build><plugins>aftermaven-compiler-pluginwith<inherited>false</inherited>. Bound to thecompilephase.README.md(+2 lines),README.zh_CN.md(+2 lines) — regenerated. The only change is the 2-line auto-generated header at the top.Verification
Locally, regenerating with NRG
1.1from Maven Central against currentmasterproduces output that diffs against the originals only by the 2-line auto-generated header. Zero functional content change.How to regenerate locally
About NRG
com.nanolaba:readme-generator— open-source, Apache 2.0, Java 8+. Ships as CLI, Maven plugin, GitHub Action, and library.