本地發展
git clone https://github.com/IEvangelist/resource-translatorcd resource-translatornpm installnpm run verify # lint + format:check + test + build加入解析器
- 喺
__tests__/data/下面加一個燈具。 - 實施
TranslationFileParser(parse、format、applyTranslations、toTranslatableTextMap)。 - 喺
translation-file-parser-factory.ts登記。 - 喺
translation-file-finder.ts加副檔名translationFileSchemes。 - 寫 parse → 格式嘅來回測試,然後 applyTranslations。
覆蓋門檻
Jest 設定會強制執行最少覆蓋範圍。 新代碼必須保持語句 + 行數閾值高於 78%,函數高於 90%。 喺換車嘅時候加埋夾具同測試。
文件網站
docs/資料夾係 Astro 6 + Tailwind v4 嘅項目。 喺嗰度跑npm install一次,然後npm run dev本地預覽。 pages.yml 工作流程每次合併都會將文件送去 GitHub Pages。