-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
462 lines (462 loc) · 15.3 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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
{
"name": "p5-server",
"displayName": "P5 Server",
"description": "Create and run p5.js sketches, browse and run collections. Includes a sketch-aware live server, a tree view of a workspace's sketches, and automatic includes of p5.js libraries.",
"license": "MIT",
"version": "1.10.0",
"publisher": "osteele",
"author": {
"name": "Oliver Steele",
"email": "[email protected]"
},
"engines": {
"vscode": "^1.58.0"
},
"categories": [
"Other"
],
"icon": "images/icon.png",
"galleryBanner": {
"color": "#E7EEFD",
"theme": "light"
},
"keywords": [
"live reload",
"web server",
"p5",
"p5.js"
],
"bugs": {
"url": "https://github.com/osteele/vscode-p5server/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/osteele/vscode-p5server.git"
},
"homepage": "https://github.com/osteele/vscode-p5server#readme",
"activationEvents": [
"onView:p5sketchExplorer",
"workspaceContains:**/*.js"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "p5-server.start",
"title": "P5 Server: Start",
"enablement": "p5-server.available"
},
{
"command": "p5-server.stop",
"title": "P5 Server: Stop",
"enablement": "p5-server.available"
},
{
"command": "p5-server.run",
"title": "Run P5 Sketch (in Browser or Sidebar)",
"enablement": "p5-server.available"
},
{
"command": "p5-server.run#browser",
"title": "Run P5 Sketch in Browser",
"enablement": "p5-server.available",
"icon": {
"dark": "./resources/dark/sketch.svg",
"light": "./resources/light/sketch.svg"
}
},
{
"command": "p5-server.run#sidebar",
"title": "Run P5 Sketch in Sidebar",
"enablement": "p5-server.available",
"icon": {
"dark": "./resources/dark/sketch.svg",
"light": "./resources/light/sketch.svg"
}
},
{
"command": "p5-server.createSketchFile",
"title": "Create a p5.js Sketch File",
"icon": "$(file-add)"
},
{
"command": "p5-server.createSketchFolder",
"title": "Create a p5.js Sketch Folder",
"icon": "$(file-directory-create)"
},
{
"command": "p5-server.openSettings",
"title": "P5 Server: Open Settings"
},
{
"command": "p5-server.showScriptOutput",
"title": "P5 Server: Show Script Output"
},
{
"command": "p5-server.showReleaseNotes",
"title": "P5 Server: Show Change Log"
},
{
"command": "p5-server.explorer.refresh",
"title": "p5.js Explorer: Refresh",
"enablement": "view == p5sketchExplorer",
"icon": "$(refresh)"
},
{
"command": "p5-server.convertSketch#script",
"title": "Convert to Script-Only",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.convertSketch#html",
"title": "Convert to HTML + JavaScript",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.deleteSketch",
"title": "Delete",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.explorer.createFolder",
"title": "Create Folder",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.explorer.createSketch",
"title": "Create Sketch (JavaScript)",
"icon": "$(file-add)",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.explorer.createSketch#html",
"title": "Create Sketch (HTML + JavaScript)",
"icon": "$(file-add)",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.explorer.createSketch#folder",
"title": "Create Sketch (Single-Sketch Folder)",
"icon": "$(folder-add)",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.duplicateSketch",
"title": "Duplicate",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.explorer.open",
"title": "Open in editor",
"enablement": "view == p5sketchExplorer",
"icon": "$(go-to-file)"
},
{
"command": "p5-server.explorer.openLibrary",
"title": "View P5.js Library Homepage",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.explorer.rename",
"title": "Rename",
"enablement": "view == p5sketchExplorer"
},
{
"command": "p5-server.explorer.run",
"title": "Run sketch",
"enablement": "view == p5sketchExplorer",
"icon": "$(run)"
},
{
"command": "p5-server.explorer.run#integrated",
"title": "Run in integrated browser",
"enablement": "view == p5sketchExplorer",
"icon": "$(run)"
},
{
"command": "p5-server.explorer.run#external",
"title": "Run in external browser",
"enablement": "view == p5sketchExplorer",
"icon": "$(run)"
}
],
"configuration": {
"title": "P5 Server",
"properties": {
"p5-server.browser": {
"type": "string",
"default": "integrated",
"enum": [
"integrated",
"system",
"Chrome",
"Edge",
"Firefox",
"Safari"
],
"description": "The browser to use for opening sketches.",
"enumDescriptions": [
"Open sketches in a pane inside Visual Studio Code.",
"Open sketches in the system default browser",
"Open sketches in Chrome. If Chrome is not installed, use the system default browser.",
"Open sketches in Edge. If Edge is not installed, use the system default browser.",
"Open sketches in Firefox. If Firefox is not installed, use the system default browser.",
"Open sketches in Safari. If Safari is not installed, use the system default browser."
]
},
"p5-server.enableProxyCache": {
"type": "boolean",
"default": true,
"description": "Whether to use a proxy to cache CDN assets. Restart the server to take effect."
},
"p5-server.console.clearOnReload": {
"type": "boolean",
"default": true,
"description": "Clear the console when reloading sketches."
},
"p5-server.console.integratedBrowser.autoShow.level": {
"type": "string",
"default": "always",
"enum": [
"always",
"never",
"error",
"warn",
"log",
"info"
],
"enumDescriptions": [
"Open the integrated console for any message",
"Never open the integrated P5 console automatically",
"Open the integrated console for errors",
"Open the integrated console for warnings and errors",
"Open the integrated console for log, warnings and errors",
"Open the integrated console for info, log, warnings and errors"
],
"description": "Open the integrated p5 console when the browser is set to the integrated browser, and a sketch calls a console method or an error occurs."
},
"p5-server.editor.infoLens": {
"type": "boolean",
"default": true,
"description": "Display console and error information in the editor"
},
"p5-server.explorer.autoReveal": {
"type": "boolean",
"default": true,
"description": "Automatically select the file in the Sketch explorer when an editor is activated. This will only select items that are already present in the explorer."
},
"p5-server.explorer.autoRunSketchOnSide": {
"type": "boolean",
"default": true,
"description": "Automatically run a sketch to the side of the editor, when it is selected in the sketch explorer."
},
"p5-server.run.openEditor": {
"type": "boolean",
"default": false,
"description": "The Run command opens the script file on the left and run the sketch on the right."
},
"p5-server.editorTitle.RunIcon.enabled": {
"type": "boolean",
"default": true,
"description": "Controls whether to show the “Open In Browser” icon in the editor title menu."
},
"p5-server.statusBar.browserItem.enabled": {
"type": "boolean",
"default": true,
"description": "Controls whether to show the “P5 Browser” item in the status bar."
},
"p5-server.statusBar.serverItem.enabled": {
"type": "boolean",
"default": true,
"description": "Controls whether to show the “P5 Server” item in the status bar."
}
}
},
"menus": {
"editor/title": [
{
"command": "p5-server.run#browser",
"when": "p5-server.runIconEnabled && p5-server.available && p5-server.browser != integrated && resourceExtname =~ /\\.(js|html)/",
"group": "navigation"
},
{
"command": "p5-server.run#sidebar",
"when": "p5-server.runIconEnabled && p5-server.available && p5-server.browser == integrated && resourceExtname =~ /\\.(js|html)/",
"group": "navigation"
}
],
"view/title": [
{
"command": "p5-server.explorer.refresh",
"when": "view == p5sketchExplorer",
"group": "navigation"
},
{
"command": "p5-server.explorer.createSketch",
"when": "view == p5sketchExplorer",
"group": "navigation"
},
{
"command": "p5-server.explorer.createSketch",
"when": "view == p5sketchExplorer",
"group": "1_create"
},
{
"command": "p5-server.explorer.createSketch#html",
"when": "view == p5sketchExplorer",
"group": "1_create"
},
{
"command": "p5-server.explorer.createSketch#folder",
"when": "view == p5sketchExplorer",
"group": "1_create"
},
{
"command": "p5-server.openSettings",
"when": "view == p5sketchExplorer",
"group": "2_settings"
}
],
"view/item/context": [
{
"command": "p5-server.explorer.open",
"when": "view == p5sketchExplorer && viewItem =~ /^file$|^sketch/",
"group": "inline"
},
{
"command": "p5-server.explorer.run",
"when": "view == p5sketchExplorer && viewItem =~ /^sketch/",
"group": "inline"
},
{
"command": "p5-server.explorer.open",
"when": "view == p5sketchExplorer && viewItem =~ /^file$|^sketch/",
"group": "1_open"
},
{
"command": "p5-server.explorer.openLibrary",
"when": "view == p5sketchExplorer && viewItem == library",
"group": "inline"
},
{
"command": "p5-server.explorer.run#integrated",
"when": "view == p5sketchExplorer && viewItem =~ /^file$|^sketch/",
"group": "2_run"
},
{
"command": "p5-server.explorer.run#external",
"when": "view == p5sketchExplorer && viewItem =~ /^file$|^sketch/",
"group": "2_run"
},
{
"command": "p5-server.convertSketch#html",
"when": "view == p5sketchExplorer && viewItem =~ /^sketch/ && viewItem != sketch:html",
"group": "3_sketchoperations"
},
{
"command": "p5-server.convertSketch#script",
"when": "view == p5sketchExplorer && viewItem =~ /^sketch/ && viewItem != sketch:script",
"group": "3_sketchoperations"
},
{
"command": "p5-server.explorer.createFolder",
"when": "view == p5sketchExplorer && viewItem == directory",
"group": "4_fileoperations"
},
{
"command": "p5-server.duplicateSketch",
"when": "view == p5sketchExplorer && viewItem =~ /^sketch/",
"group": "4_fileoperations"
},
{
"command": "p5-server.deleteSketch",
"when": "view == p5sketchExplorer && viewItem =~ /^sketch/",
"group": "4_fileoperations"
},
{
"command": "p5-server.explorer.rename",
"when": "view == p5sketchExplorer && viewItem =~ /^sketch/",
"group": "4_fileoperations"
}
]
},
"views": {
"p5js-sketch-explorer": [
{
"id": "p5sketchExplorer",
"name": "Sketches",
"icon": "resources/light/sketch.svg",
"contextualTitle": "P5.js Sketch Explorer"
}
]
},
"viewsWelcome": [
{
"view": "p5sketchExplorer",
"contents": "Create a sketch to get started.\n[Create p5.js Sketch File](command:p5-server.createSketchFile)\n[Create p5.js Sketch Folder](command:p5-server.createSketchFolder)",
"when": "workbenchState != empty && p5-server.explorer.loaded"
},
{
"view": "p5sketchExplorer",
"contents": "Open a folder to get started.\n[Open Folder](command:workbench.action.files.openFileFolder)",
"when": "workbenchState == empty"
},
{
"view": "p5sketchExplorer",
"contents": "Sketch Explorer is scanning the workspace folder(s).",
"when": "workbenchState != empty && !p5-server.explorer.loaded"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "p5js-sketch-explorer",
"title": "P5.js Sketch Explorer",
"icon": "resources/light/sketch.svg"
}
]
}
},
"scripts": {
"build:changelog": "ts-node scripts/changelog2html.ts",
"watch:changelog": "cross-env NODE_ENV=development CHANGE_LOG_WATCH=true ts-node-dev --project scripts/tsconfig.json --watch scripts,CHANGELOG.md scripts/changelog2html.ts",
"compile": "tsc -p ./",
"format": "prettier-eslint --write \"{,!(node_modules)/**/}*.ts\"",
"lint": "eslint src --ext ts",
"pretest": "npm run compile && npm run lint",
"test": "node ./out/test/runTest.js",
"package": "vsce package",
"prepare": "husky install",
"p5-server:link": "npm uninstall --no-save p5-server && npm link ../p5-server",
"p5-server:unlink": "npm unlink --no-save p5-server && npm install -E p5-server",
"publish": "vsce publish",
"vscode:prepublish": "npm run build:changelog && npm run compile",
"watch": "tsc -watch -p ./"
},
"dependencies": {
"open": "^8.4.0",
"p5-server": "0.9.2"
},
"devDependencies": {
"@osteele/changelog-parser": "0.1.0",
"@types/glob": "^7.2.0",
"@types/mocha": "^9.0.0",
"@types/node": "14.x",
"@types/pug": "^2.0.5",
"@types/vscode": "^1.58.0",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"eslint": "^8.2.0",
"glob": "^7.2.0",
"husky": "^7.0.4",
"mocha": "^9.1.3",
"node-html-parser": "^5.1.0",
"prettier-eslint-cli": "^5.0.1",
"pug": "^3.0.2",
"ts-node": "^10.4.0",
"ts-node-dev": "^1.1.8",
"typescript": "^4.4.4",
"vsce": "^2.5.1",
"vscode-test": "^1.6.1"
}
}