@gringow/gringow-vite 0.2.2 → 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' }
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  // src/get-matches-in-code.ts
2
2
  function getMatchesInCode(code) {
3
- const regex = /g(?:id)?`((?:\\`|[^`])+)`/g;
3
+ const regex = /g(?:s|id)?`((?:\\`|[^`])+)`/g;
4
4
  return [...new Set([...code.matchAll(regex)].map(([, value = ""]) => value))];
5
5
  }
6
6
 
@@ -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.2.2",
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.2.2"
43
+ "@gringow/gringow": "0.3.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "22.15.0",