lynx-intlayer 6.0.0-canary.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -40,7 +40,7 @@ const pluginIntlayerLynx = () => {
|
|
|
40
40
|
}
|
|
41
41
|
api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {
|
|
42
42
|
return mergeRsbuildConfig(config, {
|
|
43
|
-
|
|
43
|
+
resolve: {
|
|
44
44
|
alias: {
|
|
45
45
|
...(0, import_config.getAlias)({ configuration: intlayerConfig }),
|
|
46
46
|
react: import_config.ESMxCJSRequire.resolve("@lynx-js/react")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { ESMxCJSRequire, getAlias, getConfiguration } from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\nimport { join, relative } from 'path';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n // Compute the relative paths for alias configuration.\n const { mainDir, configDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n const configurationPath = join(configDir, 'configuration.json');\n const relativeConfigurationPath = relative(baseDir, configurationPath);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (intlayerConfig.content.watch) {\n watch(intlayerConfig);\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { ESMxCJSRequire, getAlias, getConfiguration } from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\nimport { join, relative } from 'path';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n // Compute the relative paths for alias configuration.\n const { mainDir, configDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n const configurationPath = join(configDir, 'configuration.json');\n const relativeConfigurationPath = relative(baseDir, configurationPath);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (intlayerConfig.content.watch) {\n watch(intlayerConfig);\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n resolve: {\n alias: {\n ...getAlias({ configuration: intlayerConfig }),\n react: ESMxCJSRequire.resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAuC;AACvC,oBAA2D;AAE3D,kBAA+B;AAsBxB,MAAM,qBAAqB,MAAqB;AACrD,SAAO;AAAA,IACL,MAAM;AAAA,IAEN,MAAM,MAAM,KAAK;AAEf,YAAM,qBAAiB,gCAAiB;AAExC,gBAAM,iCAAgB,cAAc;AAGpC,YAAM,EAAE,SAAS,WAAW,QAAQ,IAAI,eAAe;AAEvD,YAAM,uBAAmB,kBAAK,SAAS,kBAAkB;AACzD,YAAM,+BAA2B,sBAAS,SAAS,gBAAgB;AAEnE,YAAM,wBAAoB,kBAAK,WAAW,oBAAoB;AAC9D,YAAM,gCAA4B,sBAAS,SAAS,iBAAiB;AAGrE,UAAI,eAAe,QAAQ,OAAO;AAChC,mCAAM,cAAc;AAAA,MACtB;AAGA,UAAI,oBAAoB,OAAO,QAAQ,EAAE,mBAAmB,MAAM;AAChE,eAAO,mBAAmB,QAAQ;AAAA,UAChC,SAAS;AAAA,YACP,OAAO;AAAA,cACL,OAAG,wBAAS,EAAE,eAAe,eAAe,CAAC;AAAA,cAC7C,OAAO,6BAAe,QAAQ,gBAAgB;AAAA,YAChD;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
|
@@ -17,7 +17,7 @@ const pluginIntlayerLynx = () => {
|
|
|
17
17
|
}
|
|
18
18
|
api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {
|
|
19
19
|
return mergeRsbuildConfig(config, {
|
|
20
|
-
|
|
20
|
+
resolve: {
|
|
21
21
|
alias: {
|
|
22
22
|
...getAlias({ configuration: intlayerConfig }),
|
|
23
23
|
react: ESMxCJSRequire.resolve("@lynx-js/react")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { ESMxCJSRequire, getAlias, getConfiguration } from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\nimport { join, relative } from 'path';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n // Compute the relative paths for alias configuration.\n const { mainDir, configDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n const configurationPath = join(configDir, 'configuration.json');\n const relativeConfigurationPath = relative(baseDir, configurationPath);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (intlayerConfig.content.watch) {\n watch(intlayerConfig);\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { ESMxCJSRequire, getAlias, getConfiguration } from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\nimport { join, relative } from 'path';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n // Compute the relative paths for alias configuration.\n const { mainDir, configDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n const configurationPath = join(configDir, 'configuration.json');\n const relativeConfigurationPath = relative(baseDir, configurationPath);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (intlayerConfig.content.watch) {\n watch(intlayerConfig);\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n resolve: {\n alias: {\n ...getAlias({ configuration: intlayerConfig }),\n react: ESMxCJSRequire.resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":"AAAA,SAAS,iBAAiB,aAAa;AACvC,SAAS,gBAAgB,UAAU,wBAAwB;AAE3D,SAAS,MAAM,gBAAgB;AAsBxB,MAAM,qBAAqB,MAAqB;AACrD,SAAO;AAAA,IACL,MAAM;AAAA,IAEN,MAAM,MAAM,KAAK;AAEf,YAAM,iBAAiB,iBAAiB;AAExC,YAAM,gBAAgB,cAAc;AAGpC,YAAM,EAAE,SAAS,WAAW,QAAQ,IAAI,eAAe;AAEvD,YAAM,mBAAmB,KAAK,SAAS,kBAAkB;AACzD,YAAM,2BAA2B,SAAS,SAAS,gBAAgB;AAEnE,YAAM,oBAAoB,KAAK,WAAW,oBAAoB;AAC9D,YAAM,4BAA4B,SAAS,SAAS,iBAAiB;AAGrE,UAAI,eAAe,QAAQ,OAAO;AAChC,cAAM,cAAc;AAAA,MACtB;AAGA,UAAI,oBAAoB,OAAO,QAAQ,EAAE,mBAAmB,MAAM;AAChE,eAAO,mBAAmB,QAAQ;AAAA,UAChC,SAAS;AAAA,YACP,OAAO;AAAA,cACL,GAAG,SAAS,EAAE,eAAe,eAAe,CAAC;AAAA,cAC7C,OAAO,eAAe,QAAQ,gBAAgB;AAAA,YAChD;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lynx-intlayer",
|
|
3
|
-
"version": "6.0.0
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Lynx plugin for seamless internationalization (i18n) and localization (l10n) of your mobile app.",
|
|
6
6
|
"keywords": [
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"./package.json"
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@intlayer/chokidar": "6.0.0
|
|
67
|
-
"@intlayer/config": "6.0.0
|
|
68
|
-
"@intlayer/core": "6.0.0
|
|
66
|
+
"@intlayer/chokidar": "6.0.0",
|
|
67
|
+
"@intlayer/config": "6.0.0",
|
|
68
|
+
"@intlayer/core": "6.0.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@rsbuild/core": "^1.2.16",
|
|
@@ -81,17 +81,17 @@
|
|
|
81
81
|
"tsup": "^8.5.0",
|
|
82
82
|
"typescript": "^5.9.2",
|
|
83
83
|
"vitest": "^3.2.4",
|
|
84
|
-
"@utils/eslint-config": "1.0.4",
|
|
85
84
|
"@utils/ts-config-types": "1.0.4",
|
|
85
|
+
"@utils/eslint-config": "1.0.4",
|
|
86
86
|
"@utils/ts-config": "1.0.4",
|
|
87
87
|
"@utils/tsup-config": "1.0.4"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@lynx-js/rspeedy": "^0.8.2",
|
|
91
91
|
"@rsbuild/core": "^1.2.16",
|
|
92
|
-
"@intlayer/
|
|
93
|
-
"@intlayer/
|
|
94
|
-
"@intlayer/core": "6.0.0
|
|
92
|
+
"@intlayer/chokidar": "6.0.0",
|
|
93
|
+
"@intlayer/config": "6.0.0",
|
|
94
|
+
"@intlayer/core": "6.0.0"
|
|
95
95
|
},
|
|
96
96
|
"engines": {
|
|
97
97
|
"node": ">=14.18"
|