From 32e02553873625cf1301a2f09085bb93837e09d8 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Sat, 15 Jul 2023 19:22:16 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20new=20import=20statem?= =?UTF-8?q?ent=20and=20update=20module.exports=20in=20.i18nrc.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The import statement for "@lobehub/i18n-cli" is added in ".i18nrc.js" to enable its usage. Additionally, the module.exports is updated to use the defineConfig function for better configuration management. feat: Add new peerDependencies and publishConfig fields in package.json New peerDependencies and publishConfig fields are added in "package.json" to specify the required dependencies and publishing configuration respectively. This ensures proper functioning and compatibility of the project. --- .i18nrc.js | 5 +++-- package.json | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.i18nrc.js b/.i18nrc.js index 06279ebe21d8..6b36005ca70a 100644 --- a/.i18nrc.js +++ b/.i18nrc.js @@ -1,6 +1,7 @@ const { description } = require('./package.json'); +const { defineConfig } = require('@lobehub/i18n-cli'); -module.exports = { +module.exports = defineConfig({ reference: description, entry: 'public/locales/zh_CN', entryLocale: 'zh_CN', @@ -9,4 +10,4 @@ module.exports = { splitToken: 2500, temperature: 0, modelName: 'gpt-3.5-turbo', -}; +}); diff --git a/package.json b/package.json index 34e5df9c723b..0796a78e33f4 100644 --- a/package.json +++ b/package.json @@ -123,5 +123,15 @@ "stylelint": "^15", "typescript": "^5", "vitest": "latest" + }, + "peerDependencies": { + "antd": ">=5", + "antd-style": ">=3", + "react": ">=18", + "react-dom": ">=18" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org" } }