修改发布脚本和文档
This commit is contained in:
parent
9b4ab3f2f9
commit
280e3f5433
@ -10,7 +10,8 @@
|
|||||||
"test:extract": "jest extract",
|
"test:extract": "jest extract",
|
||||||
"test:translate": "jest translate",
|
"test:translate": "jest translate",
|
||||||
"demo:extract": "node ./packages/demo/extract.demo.js",
|
"demo:extract": "node ./packages/demo/extract.demo.js",
|
||||||
"demo:compile": "node ./packages/demo/compile.demo.js"
|
"demo:compile": "node ./packages/demo/compile.demo.js",
|
||||||
|
"publish":""
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
"url": "git+https://gitee.com/zhangfisher/voerka-i18n.git"
|
"url": "git+https://gitee.com/zhangfisher/voerka-i18n.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"publish": "npm publish -access public"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@voerkai18n/cli",
|
"name": "@voerkai18n/cli",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "VoerkaI18n command line interactive tools",
|
"description": "VoerkaI18n command line interactive tools",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"homepage": "https://gitee.com/zhangfisher/voerka-i18n",
|
"homepage": "https://gitee.com/zhangfisher/voerka-i18n",
|
||||||
@ -23,7 +23,8 @@
|
|||||||
"author": "wxzhang",
|
"author": "wxzhang",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"voerkai18n": "./index.js"
|
"voerkai18n": "./index.js",
|
||||||
|
"publish": "npm publish -access public"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/cli": "^7.17.6",
|
"@babel/cli": "^7.17.6",
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"build": "rollup -c"
|
"build": "rollup -c",
|
||||||
|
"publish": "npm run build && npm publish -access public"
|
||||||
},
|
},
|
||||||
"exports":{
|
"exports":{
|
||||||
"import":"./dist/index.esm.js" ,
|
"import":"./dist/index.esm.js" ,
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
- 支持`nodejs`、浏览器(`vue`/`react`)前端环境。
|
- 支持`nodejs`、浏览器(`vue`/`react`)前端环境。
|
||||||
|
|
||||||
- 采用`工程工具链`与`运行时`分开设计,发布时只需要集成很小和运行时。
|
- 采用`工程工具链`与`运行时`分开设计,发布时只需要集成很小的运行时(12K)。
|
||||||
|
|
||||||
- 高度可扩展的`复数`、`货币`、`数字`等常用的多语言处理机制。
|
- 高度可扩展的`复数`、`货币`、`数字`等常用的多语言处理机制。
|
||||||
|
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
- **@voerkai18/runtime**
|
- **@voerkai18/runtime**
|
||||||
|
|
||||||
必须的运行时(大概12K),安装到运行依赖`dependencies`中
|
必须的运行时,安装到运行依赖`dependencies`中
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
npm install --save @voerkai18/runtime
|
npm install --save @voerkai18/runtime
|
||||||
@ -160,7 +160,7 @@ myapp
|
|||||||
|
|
||||||
因此,反复执行`voerkai18n extract`命令是安全的,不会导致进行了一半的翻译内容丢失,可以放心执行。
|
因此,反复执行`voerkai18n extract`命令是安全的,不会导致进行了一半的翻译内容丢失,可以放心执行。
|
||||||
|
|
||||||
## 第三步:编码语言包
|
## 第三步:编译语言包
|
||||||
|
|
||||||
当我们完成`myapp/languages/translates`下的所有`JSON语言文件`的翻译后(如果配置了名称空间后,每一个名称空间会对应生成一个文件,详见后续`名称空间`介绍),接下来需要对翻译后的文件进行编译。
|
当我们完成`myapp/languages/translates`下的所有`JSON语言文件`的翻译后(如果配置了名称空间后,每一个名称空间会对应生成一个文件,详见后续`名称空间`介绍),接下来需要对翻译后的文件进行编译。
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user