lynx-intlayer 7.5.0-canary.0 → 7.5.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
let
|
|
2
|
-
let
|
|
1
|
+
let _intlayer_chokidar = require("@intlayer/chokidar");
|
|
2
|
+
let _intlayer_config = require("@intlayer/config");
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/pluginIntlayerLynx.ts
|
|
5
5
|
/**
|
|
@@ -26,13 +26,13 @@ const pluginIntlayerLynx = () => {
|
|
|
26
26
|
return {
|
|
27
27
|
name: "plugin-intlayer-lynx",
|
|
28
28
|
async setup(api) {
|
|
29
|
-
const configuration = (0,
|
|
30
|
-
await (0,
|
|
31
|
-
if (configuration.content.watch) (0,
|
|
29
|
+
const configuration = (0, _intlayer_config.getConfiguration)();
|
|
30
|
+
await (0, _intlayer_chokidar.prepareIntlayer)(configuration);
|
|
31
|
+
if (configuration.content.watch) (0, _intlayer_chokidar.watch)({ configuration });
|
|
32
32
|
api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {
|
|
33
33
|
return mergeRsbuildConfig(config, { resolve: { alias: {
|
|
34
|
-
...(0,
|
|
35
|
-
react: (0,
|
|
34
|
+
...(0, _intlayer_config.getAlias)({ configuration }),
|
|
35
|
+
react: (0, _intlayer_config.getProjectRequire)().resolve("@lynx-js/react")
|
|
36
36
|
} } });
|
|
37
37
|
});
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginIntlayerLynx.cjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport {\n getAlias,\n getConfiguration,\n getProjectRequire,\n} from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\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 configuration = getConfiguration();\n\n await prepareIntlayer(configuration);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (configuration.content.watch) {\n watch({ configuration });\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 }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,2BAA0C;AACrD,QAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,
|
|
1
|
+
{"version":3,"file":"pluginIntlayerLynx.cjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport {\n getAlias,\n getConfiguration,\n getProjectRequire,\n} from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\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 configuration = getConfiguration();\n\n await prepareIntlayer(configuration);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (configuration.content.watch) {\n watch({ configuration });\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 }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,2BAA0C;AACrD,QAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,wDAAkC;AAExC,iDAAsB,cAAc;AAGpC,OAAI,cAAc,QAAQ,MACxB,+BAAM,EAAE,eAAe,CAAC;AAI1B,OAAI,oBAAoB,OAAO,QAAQ,EAAE,yBAAyB;AAChE,WAAO,mBAAmB,QAAQ,EAChC,SAAS,EACP,OAAO;KACL,kCAAY,EAAE,eAAe,CAAC;KAC9B,gDAA0B,CAAC,QAAQ,iBAAiB;KACrD,EACF,EACF,CAAC;KACF;;EAEL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lynx-intlayer",
|
|
3
|
-
"version": "7.5.0
|
|
3
|
+
"version": "7.5.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": [
|
|
@@ -87,23 +87,23 @@
|
|
|
87
87
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@intlayer/chokidar": "7.5.0
|
|
91
|
-
"@intlayer/config": "7.5.0
|
|
92
|
-
"@intlayer/core": "7.5.0
|
|
93
|
-
"@intlayer/types": "7.5.0
|
|
90
|
+
"@intlayer/chokidar": "7.5.0",
|
|
91
|
+
"@intlayer/config": "7.5.0",
|
|
92
|
+
"@intlayer/core": "7.5.0",
|
|
93
|
+
"@intlayer/types": "7.5.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@rsbuild/core": "1.2.16",
|
|
97
|
-
"@types/node": "
|
|
97
|
+
"@types/node": "25.0.3",
|
|
98
98
|
"@utils/ts-config": "1.0.4",
|
|
99
99
|
"@utils/ts-config-types": "1.0.4",
|
|
100
100
|
"@utils/tsdown-config": "1.0.4",
|
|
101
101
|
"expo": "54.0.12",
|
|
102
102
|
"metro-resolver": "0.82.0",
|
|
103
103
|
"rimraf": "6.1.2",
|
|
104
|
-
"tsdown": "0.
|
|
104
|
+
"tsdown": "0.18.1",
|
|
105
105
|
"typescript": "5.9.3",
|
|
106
|
-
"vitest": "4.0.
|
|
106
|
+
"vitest": "4.0.16"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
109
|
"@lynx-js/rspeedy": ">=0.5.0",
|