@gringow/gringow-vite 0.2.1 → 0.3.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
CHANGED
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
|
|
66
66
|
```tsx
|
|
67
67
|
// App.tsx
|
|
68
|
-
import { g } from '@gringow/gringow-react'
|
|
68
|
+
import { g } from '@gringow/gringow-react/vite'
|
|
69
69
|
|
|
70
70
|
export default function App() {
|
|
71
71
|
return <h1>{g`Welcome to Gringow`}</h1>
|
|
@@ -198,7 +198,7 @@ export default defineConfig({
|
|
|
198
198
|
|
|
199
199
|
```tsx
|
|
200
200
|
// src/App.tsx
|
|
201
|
-
import { g } from '@gringow/gringow-react'
|
|
201
|
+
import { g } from '@gringow/gringow-react/vite'
|
|
202
202
|
|
|
203
203
|
export default function App() {
|
|
204
204
|
const user = { name: 'Alice' }
|
|
@@ -315,8 +315,11 @@ pnpm run watch
|
|
|
315
315
|
|
|
316
316
|
## Related Packages
|
|
317
317
|
|
|
318
|
+
Gringow provides a complete ecosystem for AI-powered translation:
|
|
319
|
+
|
|
318
320
|
- **[@gringow/gringow](https://www.npmjs.com/package/@gringow/gringow)** - Core translation library
|
|
319
|
-
- **[@gringow/gringow-
|
|
321
|
+
- **[@gringow/gringow-vite](https://www.npmjs.com/package/@gringow/gringow-vite)** - Vite plugin for build-time extraction
|
|
322
|
+
- **[@gringow/gringow-react](https://www.npmjs.com/package/@gringow/gringow-react)** - React hooks and components
|
|
320
323
|
- **[@gringow/gringow-shadow](https://www.npmjs.com/package/@gringow/gringow-shadow)** - Web Component layer
|
|
321
324
|
- **[@gringow/gringow-cli](https://www.npmjs.com/package/@gringow/gringow-cli)** - CLI tool
|
|
322
325
|
- **[@gringow/gringow-nextjs](https://www.npmjs.com/package/@gringow/gringow-nextjs)** - Next.js plugin (experimental)
|
|
@@ -6,7 +6,7 @@ import fs from 'fs/promises';
|
|
|
6
6
|
|
|
7
7
|
// src/get-matches-in-code.ts
|
|
8
8
|
function getMatchesInCode(code) {
|
|
9
|
-
const regex = /g(?:id)?`((?:\\`|[^`])+)`/g;
|
|
9
|
+
const regex = /g(?:s|id)?`((?:\\`|[^`])+)`/g;
|
|
10
10
|
return [...new Set([...code.matchAll(regex)].map(([, value = ""]) => value))];
|
|
11
11
|
}
|
|
12
12
|
async function getMatchesFromFile(filePath) {
|
|
@@ -4,7 +4,7 @@ import fs from 'fs/promises';
|
|
|
4
4
|
|
|
5
5
|
// src/get-matches-in-code.ts
|
|
6
6
|
function getMatchesInCode(code) {
|
|
7
|
-
const regex = /g(?:id)?`((?:\\`|[^`])+)`/g;
|
|
7
|
+
const regex = /g(?:s|id)?`((?:\\`|[^`])+)`/g;
|
|
8
8
|
return [...new Set([...code.matchAll(regex)].map(([, value = ""]) => value))];
|
|
9
9
|
}
|
|
10
10
|
|
package/dist/get-source-ids.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import fs from 'fs/promises';
|
|
|
6
6
|
|
|
7
7
|
// src/get-matches-in-code.ts
|
|
8
8
|
function getMatchesInCode(code) {
|
|
9
|
-
const regex = /g(?:id)?`((?:\\`|[^`])+)`/g;
|
|
9
|
+
const regex = /g(?:s|id)?`((?:\\`|[^`])+)`/g;
|
|
10
10
|
return [...new Set([...code.matchAll(regex)].map(([, value = ""]) => value))];
|
|
11
11
|
}
|
|
12
12
|
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import fs from 'fs/promises';
|
|
|
6
6
|
|
|
7
7
|
// src/get-matches-in-code.ts
|
|
8
8
|
function getMatchesInCode(code) {
|
|
9
|
-
const regex = /g(?:id)?`((?:\\`|[^`])+)`/g;
|
|
9
|
+
const regex = /g(?:s|id)?`((?:\\`|[^`])+)`/g;
|
|
10
10
|
return [...new Set([...code.matchAll(regex)].map(([, value = ""]) => value))];
|
|
11
11
|
}
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gringow/gringow-vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A Vite plugin for Gringow AI-powered translation tool",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"globby": "14.1.0",
|
|
42
42
|
"vite": "7.0.0",
|
|
43
|
-
"@gringow/gringow": "0.
|
|
43
|
+
"@gringow/gringow": "0.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "22.15.0",
|