i18n-xy
Version:
自动提取React项目中的中文字符串并进行国际化的CLI工具
121 lines (120 loc) • 3.36 kB
JSON
{
"name": "i18n-xy",
"version": "0.0.30",
"description": "自动提取React项目中的中文字符串并进行国际化的CLI工具",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"bin": {
"i18n-xy": "dist/cli.cjs",
"i18nx": "dist/cli.cjs"
},
"files": [
"dist",
"README.md"
],
"engines": {
"node": ">=16.0.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint main --ext .ts,.tsx --fix",
"lint:check": "eslint main --ext .ts,.tsx",
"format": "prettier --write \"main/**/*.{ts,tsx,js,jsx,json,md}\"",
"format:check": "prettier --check \"main/**/*.{ts,tsx,js,jsx,json,md}\"",
"format:fix": "pnpm run format && pnpm run lint",
"type-check": "tsc --noEmit",
"check-all": "pnpm run type-check && pnpm run lint:check && pnpm run format:check",
"prepublishOnly": "pnpm run build",
"postpack": "echo '✅ 打包完成,可以使用 npm publish 发布'",
"clean-test": "rm -rf test-output dist",
"extract": "pnpm build && node dist/cli.cjs extract",
"check": "pnpm build && node dist/cli.cjs check --no-file",
"translate": "pnpm build && node dist/cli.cjs translate --batch",
"rpkey": "pnpm build && node dist/cli.cjs rpkey",
"test:full": "pnpm clean-test && pnpm build && pnpm extract && pnpm check && pnpm translate && pnpm rpkey && echo '✅ 所有CLI测试完成'"
},
"keywords": [
"i18n",
"internationalization",
"localization",
"l10n",
"translation",
"react",
"vue",
"angular",
"frontend",
"cli",
"command-line-tool",
"development-tool",
"build-tool",
"typescript",
"javascript",
"jsx",
"tsx",
"babel",
"ast",
"abstract-syntax-tree",
"code-transformation",
"string-extraction",
"extraction",
"automation",
"chinese",
"chinese-characters",
"pinyin",
"chinese-to-pinyin",
"multilingual",
"language-files",
"json-generation",
"locale",
"text-processing",
"parser",
"generator",
"codemod",
"refactoring"
],
"author": "",
"license": "ISC",
"repository": {
"type": "git",
"url": ""
},
"devDependencies": {
"@babel/cli": "^7.27.2",
"@babel/core": "^7.27.4",
"@types/babel__generator": "^7.27.0",
"@types/babel__traverse": "^7.20.7",
"@types/fs-extra": "^11.0.4",
"@types/inquirer": "^9.0.8",
"@types/lodash": "^4.17.18",
"@types/micromatch": "^4.0.9",
"@types/node": "^24.0.3",
"@types/string-hash": "^1.1.3",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"prettier": "^3.3.3",
"tsup": "^8.5.0",
"typescript": "^5.8.3"
},
"dependencies": {
"@babel/generator": "^7.27.5",
"@babel/parser": "^7.27.5",
"@babel/traverse": "^7.27.4",
"@babel/types": "^7.27.6",
"baidu-translate-service": "^2.2.4",
"cli-progress": "^3.12.0",
"commander": "^14.0.0",
"fast-glob": "^3.3.3",
"fs-extra": "^11.3.0",
"inquirer": "^12.6.3",
"lodash": "^4.17.21",
"micromatch": "^4.0.8",
"pinyin-pro": "^3.26.0",
"string-hash": "^1.1.3"
}
}