-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
236 lines (236 loc) · 9.26 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
{
"name": "ng2react-vscode",
"displayName": "AngularJS to React",
"description": "Convert AngularJS to React with generative AI",
"version": "1.1.1",
"repository": {
"type": "git",
"url": "https://github.com/ng2react/vscode.git"
},
"publisher": "maxbilbow",
"engines": {
"vscode": "^1.78.0"
},
"categories": [
"Other"
],
"activationEvents": [
"workspaceContains:**/*.{js,ts}",
"onStartupFinished"
],
"main": "./out/extension.js",
"icon": "./images/icon.png",
"contributes": {
"commands": [
{
"command": "ng2react.analyseFile",
"title": "ng2react: Analyse File",
"icon": "$(search)",
"when": "ng2react.isActive && (editorLangId == 'typescript' || editorLangId == 'javascript')"
},
{
"command": "ng2react.convertToReact",
"title": "ng2react: Convert to React",
"icon": "$(globe)",
"when": "ng2react.isActive && (editorLangId == 'typescript' || editorLangId == 'javascript')"
},
{
"command": "ng2react.refreshTreeView",
"title": "ng2react: Scan Project for AngularJS Components",
"shortTitle": "Scan Project",
"icon": "$(refresh)",
"when": "ng2react.isActive"
},
{
"command": "ng2react.initCustomPrompt",
"title": "ng2react: Use Custom Prompt",
"shortTitle": "Use Custom Prompt",
"when": "ng2react.isActive"
},
{
"command": "ng2react.generateReactTest",
"title": "ng2react: Create React Unit Test",
"shortTitle": "Generate Test",
"when": "editorLangId == 'javascriptreact' || editorLangId == 'typescriptreact'"
},
{
"command": "ng2react.checkConnection",
"title": "ng2react: Check Connection",
"shortTitle": "Check Connection",
"when": "ng2react.isActive"
}
],
"menus": {
"view/title": [
{
"command": "ng2react.refreshTreeView",
"when": "view == ng2react.treeView",
"group": "navigation"
}
],
"editor/context": [
{
"command": "ng2react.analyseFile",
"group": "ng2react",
"when": "ng2react.isActive && (editorLangId == 'typescript' || editorLangId == 'javascript')"
},
{
"command": "ng2react.generateReactTest",
"group": "ng2react",
"when": "editorLangId == 'javascriptreact' || editorLangId == 'typescriptreact'"
}
]
},
"viewsWelcome": [
{
"view": "ng2react.treeView",
"contents": "Scan project for AngularJS components that can be converted to React?\n[Scan](command:ng2react.refreshTreeView)"
}
],
"views": {
"explorer": [
{
"id": "ng2react.treeView",
"name": "AngularJS to React",
"visibility": "visible",
"when": "ng2react.isActive"
}
]
},
"configuration": {
"title": "ng2react",
"properties": {
"ng2react.enabled": {
"order": 0,
"type": "string",
"default": "auto",
"enum": [
"yes",
"no",
"auto"
],
"description": "Enable ng2react. If 'auto' is selected, ng2react will only be enabled if an angularjs project is detected"
},
"ng2react.sandbox": {
"order": 1,
"type": "boolean",
"default": "false",
"description": "Enable sandbox mode. This will disable all network requests and generate a dummy response. Useful for UI testing and debugging."
},
"ng2react.openai.apiKey": {
"order": 2,
"type": "string",
"description": "API key for openai",
"scope": "application"
},
"ng2react.openai.model": {
"order": 3,
"type": "string",
"default": "gpt-4",
"enum": [
"gpt-4",
"gpt-3.5-turbo"
],
"description": "OpenAI model to use. Currently only gpt modules are supported"
},
"ng2react.openai.orginisation": {
"order": 4,
"type": "string",
"description": "Optional orginisation ID to use with openai",
"scope": "application"
},
"ng2react.openai.temperature": {
"order": 5,
"type": "number",
"default": 0.2,
"minimum": 0,
"maximum": 2,
"description": "Temperature to use with openai"
},
"ng2react.source.angularRoot": {
"type": "string",
"default": "src",
"pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.\\-/]+)+$",
"description": "Root of your angularjs source code, where all your angularjs components and templates are located"
},
"ng2react.source.reactRoot": {
"type": "string",
"default": "src",
"pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.\\-/]+)+$",
"description": "Root of your React source code, where generated React files will be saved"
},
"ng2react.source.testRoot": {
"type": "string",
"default": "src",
"pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.\\-/]+)+$",
"description": "Root of your React test code, where generated React test files will be saved"
},
"ng2react.source.testSuffix": {
"type": "string",
"default": ".test",
"enum": [
".test",
".spec"
],
"description": "Suffix for generated test files (e.g. MyComponent.test.jsx)",
"required": [
"ng2react.source.testRoot"
]
},
"ng2react.customPrompt.enabled": {
"type": "boolean",
"default": false,
"description": "Enable custom prompts. This will allow you to provide your own prompts for ng2react to use. Useful for testing and debugging."
},
"ng2react.customPrompt.location": {
"type": "string",
"default": ".ng2react",
"pattern": "^[a-zA-Z.]([a-zA-Z0-9_.\\-/]+)+$",
"description": "Folder where custom prompts can be found. Prompts must be markdown files with the extension .ng2react"
},
"ng2react.targetLanguage": {
"type": "string",
"default": "auto",
"enum": [
"typescript",
"javascript",
"auto"
],
"description": "Language to use for generated React files"
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run -S esbuild-base -- --minify",
"esbuild-base": "rimraf out && esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"build": "npm run -S esbuild-base -- --sourcemap",
"watch": "npm run -S esbuild-base -- --sourcemap --watch",
"test-compile": "tsc -p ./",
"lint": "eslint src --ext ts",
"pretest": "npm run test-compile && npm run lint",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@ng2react/core": "^1.7.1",
"@types/glob": "^8.1.0",
"@types/lodash": "^4.14.194",
"@types/markdown-it": "^12.2.3",
"@types/mocha": "^10.0.1",
"@types/node": "18",
"@types/vscode": "^1.78.0",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@vscode/test-electron": "^2.2.3",
"esbuild": "^0.17.18",
"eslint": "^8.34.0",
"glob": "^8.1.0",
"lodash": "^4.17.21",
"markdown-it": "^13.0.1",
"markdown-it-highlightjs": "^4.0.1",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"rimraf": "^5.0.0",
"typescript": "5"
}
}