@verbaly/unplugin 0.22.0 → 0.23.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.
- package/README.md +8 -7
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<img src="https://raw.githubusercontent.com/AronSoto/verbaly/develop/assets/logo.png" alt="Verbaly" width="300" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<p align="center"><em>Verbaly for webpack, Rollup, esbuild and Rspack
|
|
5
|
+
<p align="center"><em>Verbaly for webpack, Rollup, esbuild and Rspack, powered by unplugin.</em></p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/@verbaly/unplugin"><img src="https://img.shields.io/npm/v/@verbaly/unplugin?logo=npm&color=cb3837" alt="npm version" /></a>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
[Verbaly](https://github.com/AronSoto/verbaly) beyond Vite: the same compiler
|
|
14
|
+
[Verbaly](https://github.com/AronSoto/verbaly) beyond Vite: the same compiler (typed `virtual:verbaly` module, per-locale code-splitting and the **missing-translation build gate**) wrapped with [unplugin](https://github.com/unjs/unplugin) so it runs on **webpack 5, Rollup, esbuild, Rspack** (and Vite, though [`@verbaly/vite`](https://www.npmjs.com/package/@verbaly/vite) is richer there: live extraction + HMR).
|
|
15
15
|
|
|
16
16
|
## 🚀 Install
|
|
17
17
|
|
|
@@ -39,19 +39,20 @@ verbaly.esbuild({ locales: ['en', 'es'] });
|
|
|
39
39
|
verbaly.rspack({ locales: ['en', 'es'] });
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Extraction runs via the CLI
|
|
42
|
+
Extraction runs via the CLI: add it to your dev loop or CI:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
npx verbaly extract
|
|
45
|
+
npx verbaly extract # scan sources, sync catalogs, write verbaly.d.ts
|
|
46
|
+
npx verbaly extract --watch # keep extracting as you code (dev loop)
|
|
46
47
|
```
|
|
47
48
|
|
|
48
|
-
- **Same virtual module
|
|
49
|
-
- **Build gate
|
|
49
|
+
- **Same virtual module**: `import { t, setLocale } from 'virtual:verbaly'`.
|
|
50
|
+
- **Build gate**: missing translations fail the build (`failOnMissing: false` to opt out).
|
|
50
51
|
- ESM-only, like the compiler. Use `webpack.config.mjs` (or `"type": "module"`).
|
|
51
52
|
|
|
52
53
|
📖 Docs & live playground: **https://verbaly-web.vercel.app**
|
|
53
54
|
|
|
54
|
-
> ⚠️ Early development (`0.x`)
|
|
55
|
+
> ⚠️ Early development (`0.x`): API not stable yet.
|
|
55
56
|
|
|
56
57
|
## License
|
|
57
58
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verbaly/unplugin",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Verbaly for webpack, Rollup, esbuild and Rspack
|
|
3
|
+
"version": "0.23.0",
|
|
4
|
+
"description": "Verbaly for webpack, Rollup, esbuild and Rspack: extraction, virtual modules and build gate via unplugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
7
7
|
"unplugin",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"unplugin": "^3.3.0",
|
|
46
|
-
"@verbaly/compiler": "0.
|
|
46
|
+
"@verbaly/compiler": "0.23.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"verbaly": "^0.
|
|
49
|
+
"verbaly": "^0.23.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"verbaly": "0.
|
|
52
|
+
"verbaly": "0.23.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsdown",
|