@intlayer/docs 8.6.0 → 8.6.10
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/dist/cjs/doc.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +60 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/doc.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +60 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/doc.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +3 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/cli/index.md +54 -42
- package/docs/ar/cli/init.md +32 -20
- package/docs/ar/cli/standalone.md +91 -0
- package/docs/ar/configuration.md +39 -7
- package/docs/ar/custom_domains.md +250 -0
- package/docs/ar/intlayer_with_tanstack+solid.md +14 -33
- package/docs/ar/intlayer_with_tanstack.md +25 -16
- package/docs/ar/intlayer_with_vanilla.md +506 -0
- package/docs/bn/cli/index.md +195 -0
- package/docs/bn/cli/init.md +96 -0
- package/docs/bn/cli/standalone.md +91 -0
- package/docs/bn/configuration.md +46 -14
- package/docs/bn/custom_domains.md +250 -0
- package/docs/bn/intlayer_with_vanilla.md +506 -0
- package/docs/cs/cli/index.md +195 -0
- package/docs/cs/cli/init.md +96 -0
- package/docs/cs/cli/standalone.md +91 -0
- package/docs/cs/configuration.md +46 -7
- package/docs/cs/custom_domains.md +250 -0
- package/docs/cs/intlayer_with_vanilla.md +506 -0
- package/docs/de/cli/index.md +53 -41
- package/docs/de/cli/standalone.md +91 -0
- package/docs/de/configuration.md +46 -7
- package/docs/de/custom_domains.md +250 -0
- package/docs/de/intlayer_with_tanstack+solid.md +15 -36
- package/docs/de/intlayer_with_tanstack.md +25 -16
- package/docs/de/intlayer_with_vanilla.md +506 -0
- package/docs/en/bundle_optimization.md +288 -23
- package/docs/en/cli/index.md +6 -1
- package/docs/en/cli/init.md +13 -1
- package/docs/en/cli/standalone.md +91 -0
- package/docs/en/configuration.md +46 -7
- package/docs/en/custom_domains.md +245 -0
- package/docs/en/intlayer_with_tanstack+solid.md +15 -36
- package/docs/en/intlayer_with_tanstack.md +25 -16
- package/docs/en/intlayer_with_vanilla.md +506 -0
- package/docs/en-GB/cli/index.md +56 -44
- package/docs/en-GB/cli/init.md +28 -21
- package/docs/en-GB/cli/standalone.md +91 -0
- package/docs/en-GB/configuration.md +53 -14
- package/docs/en-GB/custom_domains.md +250 -0
- package/docs/en-GB/intlayer_with_tanstack+solid.md +15 -36
- package/docs/en-GB/intlayer_with_tanstack.md +25 -16
- package/docs/en-GB/intlayer_with_vanilla.md +506 -0
- package/docs/es/cli/index.md +65 -53
- package/docs/es/cli/init.md +33 -21
- package/docs/es/cli/standalone.md +91 -0
- package/docs/es/configuration.md +39 -1
- package/docs/es/custom_domains.md +250 -0
- package/docs/es/intlayer_with_tanstack+solid.md +15 -36
- package/docs/es/intlayer_with_tanstack.md +25 -16
- package/docs/es/intlayer_with_vanilla.md +506 -0
- package/docs/fr/cli/index.md +43 -31
- package/docs/fr/cli/init.md +37 -25
- package/docs/fr/cli/standalone.md +91 -0
- package/docs/fr/configuration.md +46 -7
- package/docs/fr/custom_domains.md +250 -0
- package/docs/fr/intlayer_with_tanstack+solid.md +15 -36
- package/docs/fr/intlayer_with_tanstack.md +25 -16
- package/docs/fr/intlayer_with_vanilla.md +506 -0
- package/docs/hi/cli/index.md +71 -59
- package/docs/hi/cli/init.md +37 -33
- package/docs/hi/cli/standalone.md +91 -0
- package/docs/hi/configuration.md +39 -7
- package/docs/hi/custom_domains.md +250 -0
- package/docs/hi/intlayer_with_tanstack+solid.md +14 -33
- package/docs/hi/intlayer_with_tanstack.md +25 -16
- package/docs/hi/intlayer_with_vanilla.md +506 -0
- package/docs/id/cli/index.md +59 -47
- package/docs/id/cli/init.md +32 -25
- package/docs/id/cli/standalone.md +91 -0
- package/docs/id/configuration.md +46 -7
- package/docs/id/custom_domains.md +250 -0
- package/docs/id/intlayer_with_tanstack+solid.md +14 -33
- package/docs/id/intlayer_with_tanstack.md +25 -16
- package/docs/id/intlayer_with_vanilla.md +506 -0
- package/docs/it/cli/index.md +58 -41
- package/docs/it/cli/init.md +37 -38
- package/docs/it/cli/standalone.md +91 -0
- package/docs/it/configuration.md +46 -7
- package/docs/it/custom_domains.md +250 -0
- package/docs/it/intlayer_with_tanstack+solid.md +15 -36
- package/docs/it/intlayer_with_tanstack.md +25 -16
- package/docs/it/intlayer_with_vanilla.md +506 -0
- package/docs/ja/cli/index.md +59 -47
- package/docs/ja/cli/init.md +36 -24
- package/docs/ja/cli/standalone.md +91 -0
- package/docs/ja/configuration.md +46 -7
- package/docs/ja/custom_domains.md +250 -0
- package/docs/ja/intlayer_with_tanstack+solid.md +15 -36
- package/docs/ja/intlayer_with_tanstack.md +25 -16
- package/docs/ja/intlayer_with_vanilla.md +506 -0
- package/docs/ko/cli/index.md +58 -46
- package/docs/ko/cli/init.md +39 -35
- package/docs/ko/cli/standalone.md +91 -0
- package/docs/ko/configuration.md +47 -8
- package/docs/ko/custom_domains.md +250 -0
- package/docs/ko/intlayer_with_tanstack+solid.md +15 -36
- package/docs/ko/intlayer_with_tanstack.md +25 -16
- package/docs/ko/intlayer_with_vanilla.md +506 -0
- package/docs/nl/cli/index.md +195 -0
- package/docs/nl/cli/init.md +96 -0
- package/docs/nl/cli/standalone.md +91 -0
- package/docs/nl/configuration.md +46 -7
- package/docs/nl/custom_domains.md +250 -0
- package/docs/nl/intlayer_with_vanilla.md +506 -0
- package/docs/pl/cli/index.md +56 -44
- package/docs/pl/cli/init.md +36 -32
- package/docs/pl/cli/standalone.md +91 -0
- package/docs/pl/configuration.md +46 -7
- package/docs/pl/custom_domains.md +250 -0
- package/docs/pl/intlayer_with_tanstack+solid.md +14 -33
- package/docs/pl/intlayer_with_tanstack.md +25 -16
- package/docs/pl/intlayer_with_vanilla.md +506 -0
- package/docs/pt/cli/index.md +64 -52
- package/docs/pt/cli/init.md +35 -31
- package/docs/pt/cli/standalone.md +91 -0
- package/docs/pt/configuration.md +46 -7
- package/docs/pt/custom_domains.md +250 -0
- package/docs/pt/intlayer_with_tanstack+solid.md +15 -36
- package/docs/pt/intlayer_with_tanstack.md +25 -16
- package/docs/pt/intlayer_with_vanilla.md +506 -0
- package/docs/ru/cli/index.md +54 -42
- package/docs/ru/cli/init.md +31 -27
- package/docs/ru/cli/standalone.md +91 -0
- package/docs/ru/configuration.md +46 -7
- package/docs/ru/custom_domains.md +250 -0
- package/docs/ru/intlayer_with_tanstack+solid.md +15 -36
- package/docs/ru/intlayer_with_tanstack.md +25 -16
- package/docs/ru/intlayer_with_vanilla.md +506 -0
- package/docs/tr/cli/index.md +64 -52
- package/docs/tr/cli/init.md +37 -30
- package/docs/tr/cli/standalone.md +91 -0
- package/docs/tr/configuration.md +46 -7
- package/docs/tr/custom_domains.md +250 -0
- package/docs/tr/intlayer_with_tanstack+solid.md +14 -33
- package/docs/tr/intlayer_with_tanstack.md +25 -16
- package/docs/tr/intlayer_with_vanilla.md +506 -0
- package/docs/uk/cli/index.md +60 -55
- package/docs/uk/cli/init.md +32 -20
- package/docs/uk/cli/standalone.md +91 -0
- package/docs/uk/configuration.md +46 -7
- package/docs/uk/custom_domains.md +250 -0
- package/docs/uk/intlayer_with_tanstack+solid.md +14 -33
- package/docs/uk/intlayer_with_tanstack.md +25 -16
- package/docs/uk/intlayer_with_vanilla.md +506 -0
- package/docs/ur/cli/index.md +195 -0
- package/docs/ur/cli/init.md +96 -0
- package/docs/ur/cli/standalone.md +91 -0
- package/docs/ur/configuration.md +46 -7
- package/docs/ur/custom_domains.md +250 -0
- package/docs/ur/intlayer_with_vanilla.md +506 -0
- package/docs/vi/cli/index.md +72 -61
- package/docs/vi/cli/init.md +33 -21
- package/docs/vi/cli/standalone.md +91 -0
- package/docs/vi/configuration.md +46 -7
- package/docs/vi/custom_domains.md +250 -0
- package/docs/vi/intlayer_with_tanstack+solid.md +14 -33
- package/docs/vi/intlayer_with_tanstack.md +25 -16
- package/docs/vi/intlayer_with_vanilla.md +506 -0
- package/docs/zh/cli/index.md +56 -49
- package/docs/zh/cli/init.md +30 -18
- package/docs/zh/cli/standalone.md +91 -0
- package/docs/zh/configuration.md +46 -7
- package/docs/zh/custom_domains.md +250 -0
- package/docs/zh/intlayer_with_tanstack+solid.md +15 -36
- package/docs/zh/intlayer_with_tanstack.md +25 -16
- package/docs/zh/intlayer_with_vanilla.md +506 -0
- package/package.json +8 -8
- package/src/doc.ts +4 -1
- package/src/generated/docs.entry.ts +60 -0
- package/docs/ar/bundle_optimization.md +0 -185
- package/docs/de/bundle_optimization.md +0 -195
- package/docs/en-GB/bundle_optimization.md +0 -184
- package/docs/es/bundle_optimization.md +0 -194
- package/docs/fr/bundle_optimization.md +0 -184
- package/docs/hi/bundle_optimization.md +0 -185
- package/docs/id/bundle_optimization.md +0 -185
- package/docs/it/bundle_optimization.md +0 -185
- package/docs/ja/bundle_optimization.md +0 -185
- package/docs/ko/bundle_optimization.md +0 -185
- package/docs/pl/bundle_optimization.md +0 -185
- package/docs/pt/bundle_optimization.md +0 -184
- package/docs/ru/bundle_optimization.md +0 -185
- package/docs/tr/bundle_optimization.md +0 -184
- package/docs/uk/bundle_optimization.md +0 -186
- package/docs/vi/bundle_optimization.md +0 -185
- package/docs/zh/bundle_optimization.md +0 -185
package/docs/en-GB/cli/index.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
|
-
updatedAt: 2026-
|
|
4
|
-
title: CLI
|
|
5
|
-
description: Discover how to use the Intlayer CLI to manage your multilingual website. Follow the steps in this online documentation to set up your project in
|
|
3
|
+
updatedAt: 2026-03-31
|
|
4
|
+
title: CLI - All Intlayer CLI commands for your multilingual website
|
|
5
|
+
description: Discover how to use the Intlayer CLI to manage your multilingual website. Follow the steps in this online documentation to set up your project in minutes.
|
|
6
6
|
keywords:
|
|
7
7
|
- CLI
|
|
8
8
|
- Command Line Interface
|
|
@@ -17,48 +17,54 @@ slugs:
|
|
|
17
17
|
- concept
|
|
18
18
|
- cli
|
|
19
19
|
history:
|
|
20
|
+
- version: 8.6.4
|
|
21
|
+
date: 2026-03-31
|
|
22
|
+
changes: "Added standalone command content"
|
|
20
23
|
- version: 7.5.11
|
|
21
24
|
date: 2026-01-06
|
|
22
|
-
changes: "
|
|
25
|
+
changes: "Added CI command content"
|
|
26
|
+
- version: 7.5.11
|
|
27
|
+
date: 2026-01-06
|
|
28
|
+
changes: "Added list projects command content"
|
|
23
29
|
- version: 7.5.9
|
|
24
30
|
date: 2025-12-30
|
|
25
|
-
changes: "
|
|
31
|
+
changes: "Added init command content"
|
|
26
32
|
- version: 7.2.3
|
|
27
33
|
date: 2025-11-22
|
|
28
|
-
changes: "
|
|
34
|
+
changes: "Added extract command content"
|
|
29
35
|
- version: 7.1.0
|
|
30
36
|
date: 2025-11-05
|
|
31
|
-
changes: "
|
|
37
|
+
changes: "Added skipIfExists option to translate command"
|
|
32
38
|
- version: 6.1.4
|
|
33
39
|
date: 2025-01-27
|
|
34
|
-
changes: "
|
|
40
|
+
changes: "Added aliases for CLI arguments and commands"
|
|
35
41
|
- version: 6.1.3
|
|
36
42
|
date: 2025-10-05
|
|
37
|
-
changes: "
|
|
43
|
+
changes: "Added build option to commands"
|
|
38
44
|
- version: 6.1.2
|
|
39
45
|
date: 2025-09-26
|
|
40
|
-
changes: "
|
|
46
|
+
changes: "Added version command content"
|
|
41
47
|
- version: 6.1.0
|
|
42
48
|
date: 2025-09-26
|
|
43
|
-
changes: "Set verbose option to
|
|
49
|
+
changes: "Set verbose option to true by default via CLI"
|
|
44
50
|
- version: 6.1.0
|
|
45
51
|
date: 2025-09-23
|
|
46
|
-
changes: "
|
|
52
|
+
changes: "Added watch command and with option"
|
|
47
53
|
- version: 6.0.1
|
|
48
54
|
date: 2025-09-23
|
|
49
|
-
changes: "
|
|
55
|
+
changes: "Added editor command content"
|
|
50
56
|
- version: 6.0.0
|
|
51
57
|
date: 2025-09-17
|
|
52
|
-
changes: "
|
|
58
|
+
changes: "Added content test and list commands"
|
|
53
59
|
- version: 5.5.11
|
|
54
60
|
date: 2025-07-11
|
|
55
|
-
changes: "
|
|
61
|
+
changes: "Updated documentation for CLI command parameters"
|
|
56
62
|
- version: 5.5.10
|
|
57
63
|
date: 2025-06-29
|
|
58
64
|
changes: "Init history"
|
|
59
65
|
---
|
|
60
66
|
|
|
61
|
-
# Intlayer CLI
|
|
67
|
+
# Intlayer CLI - All Intlayer CLI commands for your multilingual website
|
|
62
68
|
|
|
63
69
|
---
|
|
64
70
|
|
|
@@ -68,7 +74,7 @@ history:
|
|
|
68
74
|
|
|
69
75
|
---
|
|
70
76
|
|
|
71
|
-
##
|
|
77
|
+
## Installing the package
|
|
72
78
|
|
|
73
79
|
Install the necessary packages using npm:
|
|
74
80
|
|
|
@@ -90,17 +96,17 @@ bun add intlayer-cli -g
|
|
|
90
96
|
|
|
91
97
|
> If the `intlayer` package is already installed, the CLI is automatically installed. You can skip this step.
|
|
92
98
|
|
|
93
|
-
## intlayer-cli package
|
|
99
|
+
## The intlayer-cli package
|
|
94
100
|
|
|
95
|
-
The `intlayer-cli` package is
|
|
101
|
+
The `intlayer-cli` package is designed to transpile your [Intlayer declarations](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/dictionary/content_file.md) into dictionaries.
|
|
96
102
|
|
|
97
|
-
This package
|
|
103
|
+
This package transpiles all Intlayer files, such as `src/**/*.content.{ts|js|mjs|cjs|json}`. [See how to declare your Intlayer declaration files](https://github.com/aymericzip/intlayer/blob/main/packages/intlayer/README.md).
|
|
98
104
|
|
|
99
|
-
To interpret
|
|
105
|
+
To interpret the Intlayer dictionaries, you can use interpreters, such as [react-intlayer](https://www.npmjs.com/package/react-intlayer) or [next-intlayer](https://www.npmjs.com/package/next-intlayer).
|
|
100
106
|
|
|
101
|
-
##
|
|
107
|
+
## Config file support
|
|
102
108
|
|
|
103
|
-
Intlayer accepts
|
|
109
|
+
Intlayer accepts several configuration file formats:
|
|
104
110
|
|
|
105
111
|
- `intlayer.config.ts`
|
|
106
112
|
- `intlayer.config.js`
|
|
@@ -109,54 +115,59 @@ Intlayer accepts multiple configuration file formats:
|
|
|
109
115
|
- `intlayer.config.mjs`
|
|
110
116
|
- `.intlayerrc`
|
|
111
117
|
|
|
112
|
-
To
|
|
118
|
+
To learn how to configure the available languages or other parameters, take a look at the [configuration documentation here](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/configuration.md).
|
|
113
119
|
|
|
114
|
-
##
|
|
120
|
+
## Executing Intlayer commands
|
|
115
121
|
|
|
116
122
|
### Authentication
|
|
117
123
|
|
|
118
|
-
- **[Login](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/
|
|
124
|
+
- **[Login](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/login.md)** - Authenticate with the Intlayer CMS and get the access credentials
|
|
119
125
|
|
|
120
126
|
### Core Commands
|
|
121
127
|
|
|
122
|
-
- **[Build Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/build.md)** - Build your dictionaries from content declaration files
|
|
123
|
-
- **[Watch Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/watch.md)** - Watch for changes and automatically
|
|
128
|
+
- **[Build Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/build.md)** - Build your dictionaries from your content declaration files
|
|
129
|
+
- **[Watch Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/watch.md)** - Watch for changes and automatically rebuild dictionaries
|
|
130
|
+
- **[Create Standalone Bundle](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/standalone.md)** - Create a standalone JavaScript bundle containing Intlayer and specified packages.
|
|
124
131
|
- **[Check CLI Version](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/version.md)** - Check the installed Intlayer CLI version
|
|
125
132
|
- **[List Projects](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/list_projects.md)** - List all Intlayer projects in a directory or git repository
|
|
126
133
|
|
|
127
134
|
### Dictionary Management
|
|
128
135
|
|
|
129
|
-
- **[Push Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/push.md)** - Push dictionaries to the Intlayer
|
|
130
|
-
- **[Pull Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/pull.md)** - Pull dictionaries from the Intlayer
|
|
136
|
+
- **[Push Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/push.md)** - Push the dictionaries to the Intlayer Editor and CMS
|
|
137
|
+
- **[Pull Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/pull.md)** - Pull the dictionaries from the Intlayer Editor and CMS
|
|
131
138
|
- **[Fill Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/fill.md)** - Fill, audit, and translate dictionaries using AI
|
|
132
139
|
- **[Test Missing Translations](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/test.md)** - Test and identify missing translations
|
|
133
140
|
- **[List Content Declaration Files](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/list.md)** - List all content declaration files in your project
|
|
134
141
|
|
|
135
142
|
### Component Management
|
|
136
143
|
|
|
137
|
-
- **[
|
|
144
|
+
- **[Extract Strings](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/extract.md)** - Extract strings from components into a .content file near the component
|
|
138
145
|
|
|
139
146
|
### Configuration
|
|
140
147
|
|
|
141
148
|
- **[Initialise Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/init.md)** - Set up Intlayer in your project with automatic configuration
|
|
142
|
-
- **[Manage Configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/configuration.md)** - Get
|
|
149
|
+
- **[Manage Configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/configuration.md)** - Get your Intlayer configuration and push it to the CMS
|
|
150
|
+
|
|
151
|
+
### Doc Management
|
|
152
|
+
|
|
153
|
+
- **[Translate Document](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/doc-translate.md)** - Automatically translate document files using AI
|
|
154
|
+
- **[Review Document](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/doc-review.md)** - Review document files for quality and consistency
|
|
143
155
|
|
|
144
|
-
###
|
|
156
|
+
### Editor and Live Sync
|
|
145
157
|
|
|
146
|
-
- **[
|
|
147
|
-
- **[
|
|
158
|
+
- **[Editor Commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/editor.md)** - Use the Intlayer Editor commands
|
|
159
|
+
- **[Live Sync Commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/live.md)** - Use Live Sync to apply content changes from CMS in real time
|
|
148
160
|
|
|
149
|
-
###
|
|
161
|
+
### CI/CD and Automation
|
|
150
162
|
|
|
151
|
-
- **[
|
|
152
|
-
- **[Live Sync Commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/live.md)** - Use Live Sync to reflect CMS content changes at runtime
|
|
163
|
+
- **[CI Command](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/ci.md)** - Execute Intlayer commands with automatically injected credentials for CI/CD flows
|
|
153
164
|
|
|
154
|
-
###
|
|
165
|
+
### Developer Tools
|
|
155
166
|
|
|
156
167
|
- **[CLI SDK](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/sdk.md)** - Use the Intlayer CLI SDK in your own code
|
|
157
|
-
- **[Debug Intlayer Command](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/debug.md)** - Debug and
|
|
168
|
+
- **[Debug Intlayer Command](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/debug.md)** - Debug and resolve issues with the Intlayer CLI
|
|
158
169
|
|
|
159
|
-
## Use intlayer commands in your `package.json`
|
|
170
|
+
## Use the intlayer commands in your `package.json` file
|
|
160
171
|
|
|
161
172
|
```json fileName="package.json"
|
|
162
173
|
"scripts": {
|
|
@@ -164,6 +175,7 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
164
175
|
"intlayer:login": "npx intlayer login",
|
|
165
176
|
"intlayer:build": "npx intlayer build",
|
|
166
177
|
"intlayer:watch": "npx intlayer build --watch",
|
|
178
|
+
"intlayer:standalone": "npx intlayer standalone --packages intlayer vanilla-intlayer",
|
|
167
179
|
"intlayer:push": "npx intlayer push",
|
|
168
180
|
"intlayer:pull": "npx intlayer pull",
|
|
169
181
|
"intlayer:fill": "npx intlayer fill",
|
|
@@ -178,6 +190,6 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
178
190
|
|
|
179
191
|
> **Note**: You can also use the shorter aliases:
|
|
180
192
|
>
|
|
181
|
-
> - `npx intlayer list
|
|
182
|
-
> - `npx intlayer test
|
|
183
|
-
> - `npx intlayer projects-list` or `npx intlayer pl
|
|
193
|
+
> - `npx intlayer list`: replaces `npx intlayer content list`
|
|
194
|
+
> - `npx intlayer test`: replaces `npx intlayer content test`
|
|
195
|
+
> - `npx intlayer projects-list` or `npx intlayer pl`: replaces `npx intlayer projects list`
|
package/docs/en-GB/cli/init.md
CHANGED
|
@@ -14,9 +14,12 @@ slugs:
|
|
|
14
14
|
- cli
|
|
15
15
|
- init
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.6.4
|
|
18
|
+
date: 2026-03-31
|
|
19
|
+
changes: "Added --no-gitignore option"
|
|
17
20
|
- version: 7.5.9
|
|
18
21
|
date: 2025-12-30
|
|
19
|
-
changes: "
|
|
22
|
+
changes: "Added init command content"
|
|
20
23
|
---
|
|
21
24
|
|
|
22
25
|
# Initialise Intlayer
|
|
@@ -25,7 +28,7 @@ history:
|
|
|
25
28
|
npx intlayer init
|
|
26
29
|
```
|
|
27
30
|
|
|
28
|
-
The `init` command automatically
|
|
31
|
+
The `init` command automatically configures Intlayer for your project by creating necessary files and settings. This is the recommended way to start with Intlayer.
|
|
29
32
|
|
|
30
33
|
## Aliases:
|
|
31
34
|
|
|
@@ -33,18 +36,19 @@ The `init` command automatically sets up Intlayer in your project by configuring
|
|
|
33
36
|
|
|
34
37
|
## Arguments:
|
|
35
38
|
|
|
36
|
-
- `--project-root [projectRoot]` - Optional. Specify the project root directory. If not provided, the command will search for the project root starting from the current working directory.
|
|
39
|
+
- `--project-root [projectRoot]` - Optional. Specify the project's root directory. If not provided, the command will search for the project root starting from the current working directory.
|
|
40
|
+
- `--no-gitignore` - Optional. Skips the automatic update of the `.gitignore` file. If this flag is set, `.intlayer` will not be added to `.gitignore`.
|
|
37
41
|
|
|
38
42
|
## What it does:
|
|
39
43
|
|
|
40
44
|
The `init` command performs the following setup tasks:
|
|
41
45
|
|
|
42
|
-
1. **Validates project structure** - Ensures you are in a valid project directory
|
|
43
|
-
2. **Updates `.gitignore`** - Adds `.intlayer` to your `.gitignore` file to exclude generated files from version control
|
|
44
|
-
3. **Configures TypeScript** - Updates
|
|
45
|
-
4. **Creates configuration file** - Generates
|
|
46
|
-
5. **Updates Vite
|
|
47
|
-
6. **Updates Next.js
|
|
46
|
+
1. **Validates project structure** - Ensures you are in a valid project directory with a `package.json` file.
|
|
47
|
+
2. **Updates `.gitignore`** - Adds `.intlayer` to your `.gitignore` file to exclude generated files from version control (can be skipped with `--no-gitignore`).
|
|
48
|
+
3. **Configures TypeScript** - Updates any `tsconfig.json` files to include the Intlayer type definitions (`.intlayer/**/*.ts`).
|
|
49
|
+
4. **Creates configuration file** - Generates `intlayer.config.ts` (for TypeScript projects) or `intlayer.config.mjs` (for JavaScript projects) with default settings.
|
|
50
|
+
5. **Updates Vite configuration** - If a Vite config file is detected, it adds the import for the `vite-intlayer` plugin.
|
|
51
|
+
6. **Updates Next.js configuration** - If a Next.js config file is detected, it adds the import for the `next-intlayer` plugin.
|
|
48
52
|
|
|
49
53
|
## Examples:
|
|
50
54
|
|
|
@@ -54,17 +58,25 @@ The `init` command performs the following setup tasks:
|
|
|
54
58
|
npx intlayer init
|
|
55
59
|
```
|
|
56
60
|
|
|
57
|
-
This
|
|
61
|
+
This initialises Intlayer in the current directory, with automatic project root detection.
|
|
58
62
|
|
|
59
|
-
###
|
|
63
|
+
### Initialisation with a custom project root:
|
|
60
64
|
|
|
61
65
|
```bash
|
|
62
66
|
npx intlayer init --project-root ./my-project
|
|
63
67
|
```
|
|
64
68
|
|
|
65
|
-
This
|
|
69
|
+
This initialises Intlayer in the specified directory.
|
|
66
70
|
|
|
67
|
-
|
|
71
|
+
### Initialisation without updating .gitignore:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx intlayer init --no-gitignore
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This will set up all configuration files but will not modify your `.gitignore` file.
|
|
78
|
+
|
|
79
|
+
## Output Example:
|
|
68
80
|
|
|
69
81
|
```bash
|
|
70
82
|
npx intlayer init
|
|
@@ -78,12 +90,7 @@ Checking Intlayer configuration...
|
|
|
78
90
|
|
|
79
91
|
## Notes:
|
|
80
92
|
|
|
81
|
-
- The command is idempotent
|
|
82
|
-
- If a configuration file already exists, it will not be overwritten.
|
|
83
|
-
- TypeScript config files without an `include` array (e.g., solution-style configs with references) are skipped.
|
|
84
|
-
- The command will exit with an error if no `package.json` is found in the project root.
|
|
85
|
-
|
|
86
|
-
- The command is idempotent - you can run it multiple times safely. It will skip steps that are already configured.
|
|
93
|
+
- The command is idempotent — you can safely run it multiple times. Already configured steps will be automatically skipped.
|
|
87
94
|
- If a configuration file already exists, it will not be overwritten.
|
|
88
|
-
- TypeScript
|
|
89
|
-
- The command
|
|
95
|
+
- TypeScript configurations without an `include` array (e.g. solution-style configurations with references) are skipped.
|
|
96
|
+
- The command stops with an error if no `package.json` is found in the project root.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2026-03-31
|
|
4
|
+
title: Standalone Bundle
|
|
5
|
+
description: Learn how to create a standalone JavaScript bundle for app content.
|
|
6
|
+
keywords:
|
|
7
|
+
- Standalone
|
|
8
|
+
- Bundle
|
|
9
|
+
- CLI
|
|
10
|
+
- Intlayer
|
|
11
|
+
- Editor
|
|
12
|
+
- CMS
|
|
13
|
+
slugs:
|
|
14
|
+
- doc
|
|
15
|
+
- concept
|
|
16
|
+
- cli
|
|
17
|
+
- standalone
|
|
18
|
+
history:
|
|
19
|
+
- version: 8.6.4
|
|
20
|
+
date: 2026-03-31
|
|
21
|
+
changes: "Init standalone command documentation"
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Standalone Bundle
|
|
25
|
+
|
|
26
|
+
The `standalone` command allows you to create a standalone JavaScript bundle containing Intlayer and any other specified packages. This is particularly useful for using Intlayer in environments without a package manager or a bundler, such as a simple HTML/JS app.
|
|
27
|
+
|
|
28
|
+
The bundle uses [esbuild](https://esbuild.github.io/) to combine the requested packages and their dependencies into a single file that can be easily imported into any web project.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx intlayer standalone --packages [packages...] [options]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Options
|
|
37
|
+
|
|
38
|
+
- `-o, --outfile [outfile]` - Optional. The name of the output file. Default: `intlayer-bundle.js`.
|
|
39
|
+
- `--packages [packages...]` - Required. List of packages to include in the bundle (e.g. `intlayer`, `vanilla-intlayer`).
|
|
40
|
+
- `--version [version]` - Optional. The version of the packages to bundle. If not specified, the Intlayer CLI version is used by default.
|
|
41
|
+
- `--minify` - Optional. Whether to minify the output. Default: `true`.
|
|
42
|
+
- `--platform [platform]` - Optional. Target platform for the bundle (e.g. `browser`, `node`). Default: `browser`.
|
|
43
|
+
- `--format [format]` - Optional. Output format for the bundle (e.g. `esm`, `cjs`, `iife`). Default: `esm`.
|
|
44
|
+
|
|
45
|
+
## General Options
|
|
46
|
+
|
|
47
|
+
- `--env-file [envFile]` - Environment file.
|
|
48
|
+
- `-e, --env [env]` - Environment.
|
|
49
|
+
- `--base-dir [baseDir]` - Base directory.
|
|
50
|
+
- `--no-cache` - Disable cache.
|
|
51
|
+
- `--verbose` - Verbose output.
|
|
52
|
+
|
|
53
|
+
## Examples:
|
|
54
|
+
|
|
55
|
+
### Create a bundle for Vanilla JS:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx intlayer standalone --packages intlayer vanilla-intlayer --outfile intlayer.js
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This will create an `intlayer.js` file containing both `intlayer` and `vanilla-intlayer` packages, minified and in ESM format, ready to be used in the browser via a `<script>` tag.
|
|
62
|
+
|
|
63
|
+
### Bundle a specific version:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx intlayer standalone --packages intlayer --version 8.6.4
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Bundle in a different format:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx intlayer standalone --packages intlayer --format iife
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## What it does:
|
|
76
|
+
|
|
77
|
+
1. **Creates a temporary environment** - Sets up a temporary directory to manage dependencies.
|
|
78
|
+
2. **Installs packages** - Uses `npm` or `bun` (if available) to install the requested packages and their dependencies.
|
|
79
|
+
3. **Generates an entry point** - Creates a temporary entry point file that exports all requested packages and exposes them as global variables when running in the browser.
|
|
80
|
+
4. **Bundles with esbuild** - Uses esbuild to combine everything into a single file, applying minification and formatting as requested.
|
|
81
|
+
5. **Generates the file** - Writes the resulting bundle to the specified output path.
|
|
82
|
+
|
|
83
|
+
## Global Variables
|
|
84
|
+
|
|
85
|
+
When the bundle is loaded in the browser, it exposes the requested packages as global variables on the `window` object. Variable names are derived from the package names (e.g. `intlayer` becomes `Intlayer`, and `vanilla-intlayer` becomes `VanillaIntlayer`).
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
// Accessing Intlayer from the bundle
|
|
89
|
+
const { getLocaleName } = window.Intlayer;
|
|
90
|
+
const { installIntlayer, useIntlayer } = window.VanillaIntlayer;
|
|
91
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-04-08
|
|
4
4
|
title: Configuration
|
|
5
5
|
description: Learn how to configure Intlayer for your application. Understand the various settings and options available to customize Intlayer to your needs.
|
|
6
6
|
keywords:
|
|
@@ -14,6 +14,12 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.7.0
|
|
18
|
+
date: 2026-04-08
|
|
19
|
+
changes: "Add `prune` and `minify` options to the build configuration"
|
|
20
|
+
- version: 8.7.0
|
|
21
|
+
date: 2026-04-03
|
|
22
|
+
changes: "Add `currentDomain` option"
|
|
17
23
|
- version: 8.4.0
|
|
18
24
|
date: 2026-03-20
|
|
19
25
|
changes: "Add object per-locale notation for 'compiler.output' and 'dictionary.fill'"
|
|
@@ -237,6 +243,17 @@ const config: IntlayerConfig = {
|
|
|
237
243
|
fr: "/[locale]/a-propos",
|
|
238
244
|
},
|
|
239
245
|
}),
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Maps locales to domain hostnames for domain-based routing.
|
|
249
|
+
* URLs for these locales will be absolute (e.g., https://intlayer.cn/).
|
|
250
|
+
* The domain implies the locale, so no locale prefix is added to the path.
|
|
251
|
+
* Default: undefined
|
|
252
|
+
*/
|
|
253
|
+
domains: {
|
|
254
|
+
en: "intlayer.org",
|
|
255
|
+
zh: "intlayer.cn",
|
|
256
|
+
},
|
|
240
257
|
},
|
|
241
258
|
|
|
242
259
|
/**
|
|
@@ -388,6 +405,25 @@ const config: IntlayerConfig = {
|
|
|
388
405
|
*/
|
|
389
406
|
optimize: true,
|
|
390
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Minify the dictionaries to reduce the bundle size.
|
|
410
|
+
* Default: false
|
|
411
|
+
*
|
|
412
|
+
* Note:
|
|
413
|
+
* - This option will be ignored if `optimize` is disabled.
|
|
414
|
+
* - This option will be ignored if `editor.enabled` is true.
|
|
415
|
+
*/
|
|
416
|
+
minify: true,
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Purge the unused keys in a dictionaries.
|
|
420
|
+
* Default: false
|
|
421
|
+
*
|
|
422
|
+
* Note:
|
|
423
|
+
* - This option will be ignored if `optimize` is disabled.
|
|
424
|
+
*/
|
|
425
|
+
purge: true,
|
|
426
|
+
|
|
391
427
|
/**
|
|
392
428
|
* Output format for generated dictionary files.
|
|
393
429
|
* Default: ['cjs', 'esm']
|
|
@@ -598,12 +634,13 @@ Defines settings related to the integrated editor, including server port and act
|
|
|
598
634
|
|
|
599
635
|
Settings that control routing behavior, including URL structure, locale storage, and middleware handling.
|
|
600
636
|
|
|
601
|
-
| Field | Description
|
|
602
|
-
| ---------- |
|
|
603
|
-
| `mode` | URL routing mode for locale handling.
|
|
604
|
-
| `storage` | Configuration for storing the locale in the client.
|
|
605
|
-
| `basePath` | The base path for the application URLs.
|
|
606
|
-
| `rewrite` | Custom URL rewriting rules that override the default routing mode for specific paths. Supports `[param]` dynamic parameters.
|
|
637
|
+
| Field | Description | Type | Default | Example | Note |
|
|
638
|
+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
639
|
+
| `mode` | URL routing mode for locale handling. | `'prefix-no-default'` | <br/> `'prefix-all'` | <br/> `'no-prefix'` | <br/> `'search-params'` | `'prefix-no-default'` | `'prefix-no-default'`: `/dashboard` (en) or `/fr/dashboard` (fr). `'prefix-all'`: `/en/dashboard`. `'no-prefix'`: locale handled via other means. `'search-params'`: `/dashboard?locale=fr` | Does not impact cookie or locale storage management. |
|
|
640
|
+
| `storage` | Configuration for storing the locale in the client. | `false` | <br/> `'cookie'` | <br/> `'localStorage'` | <br/> `'sessionStorage'` | <br/> `'header'` | <br/> `CookiesAttributes` | <br/> `StorageAttributes` | <br/> `Array` | `['cookie', 'header']` | `'localStorage'` <br/> `[{ type: 'cookie', name: 'custom-locale', secure: true }]` | See Storage Options table below. |
|
|
641
|
+
| `basePath` | The base path for the application URLs. | `string` | `''` | `'/my-app'` | If app is at `https://example.com/my-app, basePath is `'/my-app'`and URLs become`https://example.com/my-app/en`. |
|
|
642
|
+
| `rewrite` | Custom URL rewriting rules that override the default routing mode for specific paths. Supports `[param]` dynamic parameters. | `Record<string, StrictModeLocaleMap<string>>` | `undefined` | See example below | • Rewrite rules take precedence over `mode`.<br/>• Works with Next.js and Vite.<br/>• `getLocalizedUrl()` automatically applies matching rules.<br/>• See [Custom URL Rewrites](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/custom_url_rewrites.md). |
|
|
643
|
+
| `domains` | Maps locales to domain hostnames for domain-based routing. When set, URLs for that locale use this domain as a base (absolute URL) and no locale prefix is added to the path. | `Partial<Record<Locale, string>>` | `undefined` | `{ zh: 'intlayer.zh', fr: 'intlayer.org' }` | • Default protocol is `https://` if not included in the hostname.<br/>• The domain itself identifies the locale, so no `/zh/` prefix is added.<br/>• `getLocalizedUrl('/', 'zh')` returns `https://intlayer.zh/`. |
|
|
607
644
|
|
|
608
645
|
**`rewrite` example**:
|
|
609
646
|
|
|
@@ -922,13 +959,15 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
922
959
|
|
|
923
960
|
> When optimized, Intlayer will replace dictionary calls to optimize chunking, so the final bundle only imports dictionaries that are actually used.
|
|
924
961
|
|
|
925
|
-
| Field | Description
|
|
926
|
-
| ----------------- |
|
|
927
|
-
| `mode` | Controls the mode of the build.
|
|
928
|
-
| `optimize` | Controls whether the build should be optimized.
|
|
929
|
-
| `
|
|
930
|
-
| `
|
|
931
|
-
| `
|
|
962
|
+
| Field | Description | Type | Default | Example | Note |
|
|
963
|
+
| ----------------- | ------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
964
|
+
| `mode` | Controls the mode of the build. | `'auto'` | <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: build enabled automatically when the application is built.<br/>• `'manual'`: only runs when the build command is executed.<br/>• Can be used to disable dictionary builds (e.g. to avoid running in Node.js environments). |
|
|
965
|
+
| `optimize` | Controls whether the build should be optimized. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • If unset, optimization is triggered on framework build (Vite/Next.js).<br/>• `true` forces optimization including dev mode.<br/>• `false` disables it.<br/>• When enabled, replaces dictionary calls to optimize chunking — only used dictionaries are imported.<br/>• Relies on `@intlayer/babel` and `@intlayer/swc` plugins.<br/>• Keys must be declared statically. |
|
|
966
|
+
| `minify` | Defines if the dictionaries should be minified to reduce the bundle size. | `boolean` | `false` | | • Defines if the bundle should be minified.<br/>• Default: `false` in production.<br/>• This option will be ignored if `optimize` is disabled.<br/>• This option will be ignored if `editor.enabled` is true. |
|
|
967
|
+
| `prune` | Defines if the unused keys in dictionaries should be purged. | `boolean` | `true` | | • Defines if the bundle should be pruned.<br/>• Default: `true` in production.<br/>• This option will be ignored if `optimize` is disabled. |
|
|
968
|
+
| `checkTypes` | Indicates if the build should check TypeScript types and log errors. | `boolean` | `false` | | Can slow down the build. |
|
|
969
|
+
| `outputFormat` | Controls the output format of the dictionaries. | `('esm' | 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
|
|
970
|
+
| `traversePattern` | Patterns defining which files to traverse during optimization. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | • Limit optimization to relevant files to improve build performance.<br/>• Ignored if `optimize` is disabled.<br/>• Uses glob pattern. |
|
|
932
971
|
|
|
933
972
|
---
|
|
934
973
|
|