-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpackage.json
593 lines (593 loc) · 24.5 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
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
{
"name": "svg",
"displayName": "SVG",
"description": "%description%",
"version": "1.5.4",
"publisher": "jock",
"engines": {
"vscode": "^1.50.0"
},
"icon": "images/svglogo.png",
"galleryBanner": {
"color": "#FFB13B",
"theme": "light"
},
"keywords": [
"svg",
"previewer",
"format"
],
"categories": [
"Programming Languages",
"Linters",
"Other"
],
"activationEvents": [
"onLanguage:svg",
"onCommand:svg.showSvg",
"onCommand:_svg.showSvgByUri",
"onCommand:_svg.minifySvg",
"onCommand:_svg.minifySvgToFile",
"onCommand:svg.showAllSvg",
"onCommand:svg.copyDataUri"
],
"main": "./client/out/extension.js",
"contributes": {
"commands": [
{
"command": "svg.showSvg",
"title": "%svg.showSvg.title%",
"icon": "$(open-preview)",
"enablement": "!config.svg.preview.disable"
},
{
"command": "_svg.showSvgByUri",
"title": "%svg.showSvg.title%",
"icon": "$(open-preview)",
"enablement": "!config.svg.preview.disable"
},
{
"command": "_svg.minifySvg",
"title": "%svg.minifySvg.title%",
"enablement": "editorLangId == svg"
},
{
"command": "_svg.minifySvgToFile",
"title": "%svg.minifySvg.title%",
"enablement": "resourceLangId == svg"
},
{
"command": "svg.showAllSvg",
"title": "Preview All Svg",
"category": "SVG",
"enablement": "workbenchState != empty"
},
{
"command": "svg.copyDataUri",
"title": "Copy as Image Data Uri",
"category": "SVG",
"enablement": "editorLangId == svg"
}
],
"menus": {
"editor/title": [
{
"command": "svg.showSvg",
"when": "editorLangId == svg && !config.svg.preview.disable",
"group": "navigation"
}
],
"editor/context": [
{
"command": "_svg.minifySvg",
"when": "editorLangId == svg",
"group": "2"
},
{
"command": "svg.copyDataUri",
"group": "2",
"when": "resourceLangId == svg"
}
],
"explorer/context": [
{
"command": "_svg.showSvgByUri",
"when": "resourceLangId == svg && !config.svg.preview.disable",
"group": "navigation"
},
{
"command": "_svg.minifySvgToFile",
"when": "resourceLangId == svg && !config.svg.preview.disable",
"group": "1_modification"
}
]
},
"configuration": {
"title": "%configuration.title%",
"properties": {
"svg.completion.showAdvanced": {
"title": "%configuration.completion.showAdvanced.title%",
"description": "%configuration.completion.showAdvanced.description%",
"type": "boolean",
"default": false
},
"svg.completion.showDeprecated": {
"title": "%configuration.completion.showDeprecated.title%",
"description": "%configuration.completion.showDeprecated.description%",
"type": "boolean",
"default": false
},
"svg.completion.elementsActionAsSimple": {
"title": "Simple Elements",
"description": "Custom elements completion action as simple like `<feTurbulence />`, one item to one name",
"type": "array",
"default": [],
"items": {
"type": "string",
"title": "Element name",
"pattern": "^[a-z]([a-zA-Z0-9-]*)$"
}
},
"svg.completion.emmet": {
"title": "%configuration.completion.emmet.title%",
"description": "%configuration.completion.emmet.description%",
"type": "boolean",
"default": false
},
"svg.preview.scaleZoom": {
"title": "Scale Variation",
"description": "The scale of change of the zoom operation",
"type": "number",
"default": 2,
"minimum": 1.1,
"maximum": 8
},
"svg.preview.zoomOptions": {
"title": "Zoom Select Options",
"description": "Zoom select dropdown options",
"type": "array",
"default": [
"25%",
"50%",
"100%",
"200%",
"400%",
"800%"
],
"items": {
"type": "string",
"pattern": "^\\d+%$"
}
},
"svg.preview.translateExternalAddress": {
"title": "%configuration.preview.translateExternalAddress.title%",
"description": "%configuration.preview.translateExternalAddress.description%",
"type": "boolean",
"default": false
},
"svg.preview.disable": {
"title": "Disable Preview",
"description": "If you just want use other previewer",
"type": "boolean",
"default": false
},
"svg.preview.autoShow": {
"title": "Auto Show Preview",
"description": "Auto show preview on side when a SVG document open",
"type": "boolean",
"default": false
},
"svg.previewAll.exclude": {
"title": "Preview Exclude",
"description": "Exclude Glob pattern for `Preview All Svg`",
"type": "string",
"default": "**/node_modules/**"
},
"svg.pathDataHighlight": {
"description": "Show Grammar Highlight in path data",
"type": "boolean",
"default": true
},
"svg.minify.cleanupAttrs": {
"description": "cleanup attributes from newlines, trailing, and repeating spaces",
"type": ["boolean", "object"],
"default": true
},
"svg.minify.inlineStyles": {
"type": ["boolean", "object"],
"default": true,
"description": "move and merge styles from <style> elements to element style attributes"
},
"svg.minify.removeDoctype": {
"type": ["boolean", "object"],
"default": true,
"description": "remove doctype declaration"
},
"svg.minify.removeXMLProcInst": {
"type": ["boolean", "object"],
"default": true,
"description": "remove XML processing instructions"
},
"svg.minify.removeComments": {
"type": ["boolean", "object"],
"default": true,
"description": "remove comments"
},
"svg.minify.removeMetadata": {
"type": ["boolean", "object"],
"default": true,
"description": "remove <metadata>"
},
"svg.minify.removeTitle": {
"type": ["boolean", "object"],
"default": true,
"description": "remove <title>"
},
"svg.minify.removeDesc": {
"type": ["boolean", "object"],
"default": true,
"description": "remove <desc>"
},
"svg.minify.removeUselessDefs": {
"type": ["boolean", "object"],
"default": true,
"description": "remove elements of <defs> without id"
},
"svg.minify.removeXMLNS": {
"type": ["boolean", "object"],
"default": false,
"description": "removes xmlns attribute (for inline svg, disabled by default)"
},
"svg.minify.removeEditorsNSData": {
"type": ["boolean", "object"],
"default": true,
"description": "remove editors namespaces, elements, and attributes"
},
"svg.minify.removeEmptyAttrs": {
"type": ["boolean", "object"],
"default": true,
"description": "remove empty attributes"
},
"svg.minify.removeHiddenElems": {
"type": ["boolean", "object"],
"default": true,
"description": "remove hidden elements"
},
"svg.minify.removeEmptyText": {
"type": ["boolean", "object"],
"default": true,
"description": "remove empty Text elements"
},
"svg.minify.removeEmptyContainers": {
"type": ["boolean", "object"],
"default": true,
"description": "remove empty Container elements"
},
"svg.minify.removeViewBox": {
"type": ["boolean", "object"],
"default": true,
"description": "remove viewBox attribute when possible"
},
"svg.minify.cleanupEnableBackground": {
"type": ["boolean", "object"],
"default": true,
"description": "remove or cleanup enable-background attribute when possible"
},
"svg.minify.minifyStyles": {
"type": ["boolean", "object"],
"default": true,
"description": "minify <style> elements content with CSSO"
},
"svg.minify.convertStyleToAttrs": {
"type": ["boolean", "object"],
"default": true,
"description": "convert styles into attributes"
},
"svg.minify.convertColors": {
"type": ["boolean", "object"],
"default": true,
"description": "convert colors (from rgb() to #rrggbb, from #rrggbb to #rgb)"
},
"svg.minify.convertPathData": {
"type": ["boolean", "object"],
"default": true,
"description": "convert Path data to relative or absolute (whichever is shorter), convert one segment to another, trim useless delimiters, smart rounding, and much more"
},
"svg.minify.convertTransform": {
"type": ["boolean", "object"],
"default": true,
"description": "collapse multiple transforms into one, convert matrices to the short aliases, and much more"
},
"svg.minify.removeUnknownsAndDefaults": {
"type": ["boolean", "object"],
"default": true,
"description": "remove unknown elements content and attributes, remove attrs with default values"
},
"svg.minify.removeNonInheritableGroupAttrs": {
"type": ["boolean", "object"],
"default": true,
"description": "remove non-inheritable group's \"presentation\" attributes"
},
"svg.minify.removeUselessStrokeAndFill": {
"type": ["boolean", "object"],
"default": true,
"description": "remove useless stroke and fill attrs"
},
"svg.minify.removeUnusedNS": {
"type": ["boolean", "object"],
"default": true,
"description": "remove unused namespaces declaration"
},
"svg.minify.prefixIds": {
"type": [
"boolean",
"object"
],
"default": true,
"description": "prefix IDs and classes with the SVG filename or an arbitrary string"
},
"svg.minify.cleanupIDs": {
"type": ["boolean", "object"],
"default": true,
"description": "remove unused and minify used IDs"
},
"svg.minify.cleanupNumericValues": {
"type": ["boolean", "object"],
"default": true,
"description": "round numeric values to the fixed precision, remove default px units"
},
"svg.minify.cleanupListOfValues": {
"type": ["boolean", "object"],
"default": true,
"description": "round numeric values in attributes that take a list of numbers (like viewBox or enable-background)"
},
"svg.minify.moveElemsAttrsToGroup": {
"type": ["boolean", "object"],
"default": true,
"description": "move elements' attributes to their enclosing group"
},
"svg.minify.moveGroupAttrsToElems": {
"type": ["boolean", "object"],
"default": true,
"description": "move some group attributes to the contained elements"
},
"svg.minify.collapseGroups": {
"type": ["boolean", "object"],
"default": true,
"description": "collapse useless groups"
},
"svg.minify.removeRasterImages": {
"type": ["boolean", "object"],
"default": false,
"description": "remove raster images (disabled by default)"
},
"svg.minify.mergePaths": {
"type": ["boolean", "object"],
"default": true,
"description": "merge multiple Paths into one"
},
"svg.minify.convertShapeToPath": {
"type": ["boolean", "object"],
"default": true,
"description": "convert some basic shapes to <path>"
},
"svg.minify.convertEllipseToCircle": {
"type": ["boolean", "object"],
"default": true,
"description": "convert non-eccentric <ellipse> to <circle>"
},
"svg.minify.sortAttrs": {
"type": ["boolean", "object"],
"default": false,
"description": "sort element attributes for epic readability (disabled by default)"
},
"svg.minify.sortDefsChildren": {
"type": ["boolean", "object"],
"default": true,
"description": "sort children of <defs> in order to improve compression"
},
"svg.minify.removeDimensions": {
"type": ["boolean", "object"],
"default": false,
"description": "remove width/height and add viewBox if it's missing (opposite to removeViewBox, disable it first) (disabled by default)"
},
"svg.minify.removeAttrs": {
"type": ["boolean", "object"],
"default": false,
"description": "remove attributes by pattern (disabled by default)"
},
"svg.minify.removeAttributesBySelector": {
"type": ["boolean", "object"],
"default": false,
"description": "removes attributes of elements that match a css selector (disabled by default)"
},
"svg.minify.removeElementsByAttr": {
"type": ["boolean", "object"],
"default": false,
"description": "remove arbitrary elements by ID or className (disabled by default)"
},
"svg.minify.addClassesToSVGElement": {
"type": ["boolean", "object"],
"default": false,
"description": "add classnames to an outer <svg> element (disabled by default)"
},
"svg.minify.addAttributesToSVGElement": {
"type": ["boolean", "object"],
"default": false,
"description": "adds attributes to an outer <svg> element (disabled by default)"
},
"svg.minify.removeOffCanvasPaths": {
"type": ["boolean", "object"],
"default": false,
"description": "removes elements that are drawn outside of the viewbox (disabled by default)"
},
"svg.minify.removeStyleElement": {
"type": ["boolean", "object"],
"default": false,
"description": "remove <style> elements (disabled by default)"
},
"svg.minify.removeScriptElement": {
"type": ["boolean", "object"],
"default": false,
"description": "remove <script> elements (disabled by default)"
},
"svg.minify.reusePaths": {
"type": ["boolean", "object"],
"default": false,
"description": "Find duplicated elements and replace them with links (disabled by default)"
},
"svg.preview.viewMode": {
"type": "string",
"default": "onlyOne",
"description": "How the previewer interacts with the user",
"enum": [
"onlyOne",
"oneByOne"
],
"enumDescriptions": [
"Only one preview window will be displayed",
"Each SVG document corresponds to a separate preview window"
]
},
"svg.preview.mode": {
"type": "string",
"default": "svg",
"description": "How show svg content in preview view",
"enum": [
"svg",
"img"
],
"enumDescriptions": [
"SVG embedded in HTML",
"Show SVG in IMG element"
]
},
"svg.preview.backgroundSaveTo": {
"type": "string",
"default": "Workspace",
"description": "When you change the background color in the preview view, the new settings store the location",
"enum": [
"Global",
"Workspace",
"NoSave"
],
"enumDescriptions": [
"Save new background in your global scope",
"Save new background in your workspace",
"Only temporarily changed, configuration will not be saved"
]
},
"svg.preview.toolbarSize": {
"title": "Toolbar Size",
"description": "This SVG preview toolbar size",
"type": "string",
"enum": [
"mini",
"middle",
"large"
],
"default": "middle"
},
"svg.preview.background": {
"title": "%configuration.preview.background.title%",
"type": "string",
"enum": [
"editor",
"transparent",
"dark-transparent",
"white",
"black",
"custom"
],
"enumDescriptions": [
"Editor Background",
"Transparent",
"Dark Transparent",
"White",
"Black",
"Custom"
],
"default": "editor",
"description": "%configuration.preview.background.description%"
},
"svg.preview.backgroundCustom": {
"title": "%configuration.preview.backgroundCustom.title%",
"type": "string",
"default": "#eee",
"description": "%configuration.preview.backgroundCustom.description%"
},
"svg.preview.showRuler": {
"title": "Show Ruler",
"type": "boolean",
"default": false,
"description": "Preview show ruler by default, you can switch it from toolbar"
},
"svg.preview.showCrossLine": {
"title": "Show Crossline",
"type": "boolean",
"default": false,
"description": "Preview show cross line (will hide mouse pointer) by default, you can switch it from toolbar"
},
"svg.preview.autoFit": {
"title": "Auto Fit",
"type": "boolean",
"default": true,
"description": "Preview show fit mode at startup"
}
}
},
"languages": [
{
"id": "svg",
"aliases": [
"SVG",
"svg"
],
"mimetypes": [
"image/svg+xml"
],
"configuration": "./svg.language-configuration.json",
"extensions": [
".svg"
]
}
],
"grammars": [
{
"language": "svg",
"scopeName": "text.xml.svg",
"path": "./syntaxes/svg.json",
"embeddedLanguages": {
"meta.embedded.block.css": "css",
"meta.embedded.block.js": "javascript"
}
}
],
"html": {
"customData": [
"./html.html-data.json"
]
}
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/lishu/vscode-svg2.git"
},
"scripts": {
"vscode:prepublish": "cd client && npm run vscode:prepublish && cd ../server && npm run vscode:prepublish",
"compile": "tsc -b",
"watch": "tsc -b -w",
"postinstall": "cd client && npm install && cd ../server && npm install && cd ..",
"clear": "del client\\out\\*.* /q && del server\\out\\*.* /q"
},
"devDependencies": {
"@types/mocha": "^5.2.0",
"@types/node": "^8.0.0",
"ts-loader": "^9.4.2",
"tslint": "^5.16.0",
"typescript": "^4.2.2",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.2"
}
}