ai-localize-framework-detectors 2.0.4 → 2.0.6
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/CHANGELOG.md +7 -0
- package/README.md +58 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# ai-localize-framework-detectors
|
|
2
|
+
|
|
3
|
+
> Auto-detect React, Angular, Vue, Next.js, and more for the [ai-localize-core](https://github.com/ai-localize/ai-localize-core) platform.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/ai-localize-framework-detectors)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## What it does
|
|
11
|
+
|
|
12
|
+
Analyses `package.json` dependencies and config files to determine the frontend framework in use, with confidence scoring and evidence reporting.
|
|
13
|
+
|
|
14
|
+
**Detection priority:** Next.js → React → Angular → Vue → jQuery → Vanilla JS
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install ai-localize-framework-detectors
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { detectFramework, detectI18nLibrary } from 'ai-localize-framework-detectors';
|
|
26
|
+
|
|
27
|
+
const result = await detectFramework(process.cwd());
|
|
28
|
+
// { framework: 'react-vite', confidence: 0.95, evidence: ['vite found', 'react found'] }
|
|
29
|
+
|
|
30
|
+
const i18n = await detectI18nLibrary(process.cwd());
|
|
31
|
+
// { library: 'react-i18next', hookName: 'useTranslation' }
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Supported frameworks
|
|
35
|
+
|
|
36
|
+
| Value | Description |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `react` | Generic React |
|
|
39
|
+
| `react-cra` | Create React App |
|
|
40
|
+
| `react-vite` | React + Vite |
|
|
41
|
+
| `react-nextjs` | Next.js |
|
|
42
|
+
| `angular` | Generic Angular |
|
|
43
|
+
| `angular-ngx` | Angular + ngx-translate |
|
|
44
|
+
| `angular-i18n` | Angular built-in i18n |
|
|
45
|
+
| `vue` | Generic Vue |
|
|
46
|
+
| `vue-i18n` | Vue + vue-i18n |
|
|
47
|
+
| `jquery` | jQuery |
|
|
48
|
+
| `vanilla-js` | Vanilla JS |
|
|
49
|
+
| `jsp` | JSP/Java Server Pages |
|
|
50
|
+
| `unknown` | Not detected |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Part of ai-localize-core
|
|
55
|
+
|
|
56
|
+
Install the CLI for the complete toolset: `npm install -g ai-localize-cli`
|
|
57
|
+
|
|
58
|
+
MIT © ai-localize-core contributors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-localize-framework-detectors",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Auto-detect frontend frameworks from project structure",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"node": ">=18.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"ai-localize-shared": "2.0.
|
|
36
|
+
"ai-localize-shared": "2.0.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"tsup": "^8.0.1",
|