i18next-cli 1.46.0 → 1.46.1
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.
- package/README.md +9 -0
- package/dist/cjs/cli.js +1 -1
- package/dist/esm/cli.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -7,6 +7,10 @@ A unified, high-performance i18next CLI toolchain, powered by SWC.
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
> By default, `i18next-cli` only extracts translation keys from JavaScript and TypeScript files (`.js`, `.jsx`, `.ts`, `.tsx`).
|
|
12
|
+
> To extract from other file types (such as `.pug`, `.vue`, `.svelte`, etc.), you must use or create a plugin. Specifying additional file extensions in the `extract.input` config is not sufficient on its own—plugins are required for non-JS/TS formats. See the [Plugin System](#plugin-system) section for details and examples.
|
|
13
|
+
|
|
10
14
|
`i18next-cli` is a complete reimagining of the static analysis toolchain for the i18next ecosystem. It consolidates key extraction, type safety generation, locale syncing, linting, and cloud integrations into a single, cohesive, and blazing-fast CLI.
|
|
11
15
|
|
|
12
16
|
> ### 🚀 Try it Now - Zero Config!
|
|
@@ -80,6 +84,7 @@ Get an overview of your project's localization health:
|
|
|
80
84
|
npx i18next-cli status
|
|
81
85
|
```
|
|
82
86
|
|
|
87
|
+
|
|
83
88
|
### 3. Extract Translation Keys
|
|
84
89
|
|
|
85
90
|
```bash
|
|
@@ -336,6 +341,7 @@ The configuration file supports both TypeScript (`.ts`) and JavaScript (`.js`) f
|
|
|
336
341
|
|
|
337
342
|
> **💡 No Installation Required?** If you don't want to install `i18next-cli` as a dependency, you can skip the `defineConfig` helper and return a plain JavaScript object or JSON instead. The `defineConfig` function is purely for TypeScript support and doesn't affect functionality.
|
|
338
343
|
|
|
344
|
+
|
|
339
345
|
### Basic Configuration
|
|
340
346
|
|
|
341
347
|
```typescript
|
|
@@ -351,6 +357,9 @@ export default defineConfig({
|
|
|
351
357
|
});
|
|
352
358
|
```
|
|
353
359
|
|
|
360
|
+
> **❗ Important:**
|
|
361
|
+
> Only `.js`, `.jsx`, `.ts`, and `.tsx` files are extracted by default. If you want to extract from other file types (e.g., `.pug`, `.vue`), you must use or create a plugin. See the [Plugin System](#plugin-system) section for more information.
|
|
362
|
+
|
|
354
363
|
**Alternative without local installation:**
|
|
355
364
|
|
|
356
365
|
```javascript
|
package/dist/cjs/cli.js
CHANGED
|
@@ -28,7 +28,7 @@ const program = new commander.Command();
|
|
|
28
28
|
program
|
|
29
29
|
.name('i18next-cli')
|
|
30
30
|
.description('A unified, high-performance i18next CLI.')
|
|
31
|
-
.version('1.46.
|
|
31
|
+
.version('1.46.1'); // This string is replaced with the actual version at build time by rollup
|
|
32
32
|
// new: global config override option
|
|
33
33
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
34
34
|
program
|
package/dist/esm/cli.js
CHANGED
|
@@ -26,7 +26,7 @@ const program = new Command();
|
|
|
26
26
|
program
|
|
27
27
|
.name('i18next-cli')
|
|
28
28
|
.description('A unified, high-performance i18next CLI.')
|
|
29
|
-
.version('1.46.
|
|
29
|
+
.version('1.46.1'); // This string is replaced with the actual version at build time by rollup
|
|
30
30
|
// new: global config override option
|
|
31
31
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
32
32
|
program
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18next-cli",
|
|
3
|
-
"version": "1.46.
|
|
3
|
+
"version": "1.46.1",
|
|
4
4
|
"description": "A unified, high-performance i18next CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@rollup/plugin-replace": "6.0.3",
|
|
56
56
|
"@rollup/plugin-terser": "0.4.4",
|
|
57
57
|
"@types/inquirer": "9.0.9",
|
|
58
|
-
"@types/node": "25.3.
|
|
58
|
+
"@types/node": "25.3.2",
|
|
59
59
|
"@types/react": "19.2.14",
|
|
60
60
|
"@vitest/coverage-v8": "4.0.18",
|
|
61
61
|
"eslint": "9.39.2",
|
|
@@ -69,17 +69,17 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@croct/json5-parser": "0.2.2",
|
|
72
|
-
"@swc/core": "1.15.
|
|
72
|
+
"@swc/core": "1.15.17",
|
|
73
73
|
"yaml": "2.8.2",
|
|
74
74
|
"chokidar": "5.0.0",
|
|
75
75
|
"commander": "14.0.3",
|
|
76
76
|
"execa": "9.6.1",
|
|
77
77
|
"glob": "13.0.6",
|
|
78
78
|
"i18next-resources-for-ts": "2.0.0",
|
|
79
|
-
"inquirer": "13.
|
|
79
|
+
"inquirer": "13.3.0",
|
|
80
80
|
"jiti": "2.6.1",
|
|
81
81
|
"jsonc-parser": "3.3.1",
|
|
82
|
-
"minimatch": "10.2.
|
|
82
|
+
"minimatch": "10.2.4",
|
|
83
83
|
"ora": "9.3.0",
|
|
84
84
|
"react": "^19.2.4",
|
|
85
85
|
"react-i18next": "^16.5.4"
|