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