-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpackage.json
345 lines (345 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
{
"name": "svgo",
"displayName": "svgo",
"version": "3.1.0",
"private": true,
"description": "Fully featured SVGO plugin for Visual Studio Code",
"categories": [
"Formatters"
],
"homepage": "https://github.com/1000ch/vscode-svgo#readme",
"bugs": "https://github.com/1000ch/vscode-svgo/issues",
"repository": "https://github.com/1000ch/vscode-svgo",
"license": "MIT",
"qna": "https://stackoverflow.com/questions/tagged/vscode+svgo",
"author": {
"name": "Shogo Sensui",
"email": "[email protected]",
"web": "https://github.com/1000ch"
},
"publisher": "1000ch",
"main": "out/extension.js",
"scripts": {
"vscode:prepublish": "npm run build",
"build": "tsc",
"test": "xo"
},
"contributes": {
"commands": [
{
"command": "svgo.minify",
"title": "svgo: Minify current SVG file"
},
{
"command": "svgo.format",
"title": "svgo: Format current SVG file"
}
],
"configuration": {
"type": "object",
"title": "SVGO",
"properties": {
"svgo.addClassesToSVGElement": {
"type": "boolean",
"default": false,
"description": "Overrides the class attribute in the outer most <svg> element, omitting duplicates or null classes if found in your configuration."
},
"svgo.addAttributesToSVGElement": {
"type": "boolean",
"default": false,
"description": "Adds attributes to the outer most <svg> element in the document. This is not an optimization and will increase the size of SVG documents."
},
"svgo.cleanupAttrs": {
"type": "boolean",
"default": true,
"description": "Removes redundant whitespaces from attribute values. This will not modify the attribute keys, nor remove them if the value becomes empty after optimization."
},
"svgo.cleanupEnableBackground": {
"type": "boolean",
"default": true,
"description": "Cleans up enable-background, unless the document uses <filter> elements. Only cleans up attribute values and inline-styles, but does not affect stylesheets in <style> nodes."
},
"svgo.cleanupIds": {
"type": "boolean",
"default": true,
"description": "emoves unused IDs, and minifys IDs that are referenced by other elements."
},
"svgo.cleanupListOfValues": {
"type": "boolean",
"default": true,
"description": "Rounds numeric values in attributes, such as those found in viewBox, enable-background, and points."
},
"svgo.cleanupNumericValues": {
"type": "boolean",
"default": true,
"description": "Rounds numeric values, and removes the unit when it's px as this is the default."
},
"svgo.collapseGroups": {
"type": "boolean",
"default": true,
"description": "Finds groups that effectively do nothing and flattens them, preserving the contents of the groups. Groups can be formed using the <g> element. They're used for organizing the document, or applying presentation attributes to all children contained in a group."
},
"svgo.convertColors": {
"type": "boolean",
"default": true,
"description": "Converts color references to the shortest equivalent."
},
"svgo.convertEllipseToCircle": {
"type": "boolean",
"default": true,
"description": "Convert non-eccentric <ellipse> elements to <circle> elements."
},
"svgo.convertOneStopGradients": {
"type": "boolean",
"default": false,
"description": "Converts the <linearGradient> and <radialGradient> nodes that are effectively a solid color to the color. These nodes contain <stop> elements, which represent various colors to transition between. However, if a gradient only contains a single <stop>, then it's effecitively a solid fill. Definitions of the gradients are removed, and the parent <defs> node is removed if it has no children after optimization. The xlink:href namespace is also removed if there are no remaining elements using this attribute."
},
"svgo.convertPathData": {
"type": "boolean",
"default": true,
"description": "Optimize path commands found in <path>, <glyph>, and <missing-glyph> elements. Path commands are the syntax used in the d attribute, each character represents an instruction to draw paths."
},
"svgo.convertShapeToPath": {
"type": "boolean",
"default": true,
"description": "Convert basic shapes to <path> elements."
},
"svgo.convertStyleToAttrs": {
"type": "boolean",
"default": false,
"description": "Converts presentation attributes in element styles to the equvilent XML attribute."
},
"svgo.convertTransform": {
"type": "boolean",
"default": true,
"description": "Collapse multiple transforms into one, convert matrices to the short aliases, and much more."
},
"svgo.inlineStyles": {
"type": "boolean",
"default": true,
"description": "Merges styles from <style> elements to the style attribute of matching elements."
},
"svgo.mergePaths": {
"type": "boolean",
"default": true,
"description": "Merge multiple paths into one."
},
"svgo.mergeStyles": {
"type": "boolean",
"default": true,
"description": "Merge multiple <style> elements into one."
},
"svgo.minifyStyles": {
"type": "boolean",
"default": true,
"description": "Minify <style> elements with CSSO."
},
"svgo.moveElemsAttrsToGroup": {
"type": "boolean",
"default": true,
"description": "Move an elements attributes to their enclosing group."
},
"svgo.moveGroupAttrsToElems": {
"type": "boolean",
"default": true,
"description": "Move some group attributes to the contained elements."
},
"svgo.prefixIds": {
"type": "boolean",
"default": false,
"description": "Prefix element IDs and class names with the filename or another arbitrary string. This is useful for reducing the likeliness of ID conflicts when multiple vectors are inlined into the same document."
},
"svgo.removeAttributesBySelector": {
"type": "boolean",
"default": false,
"description": "Removes specific attributes from elements that match a CSS selector."
},
"svgo.removeAttrs": {
"type": "boolean",
"default": false,
"description": "Remove attributes from elements matching a custom syntax."
},
"svgo.removeComments": {
"type": "boolean",
"default": true,
"description": "Removes XML comments from the document. XML comments are the content between the <!-- and --> syntax, and do not effect rendering. From an optimization perspective, these can always be safely removed."
},
"svgo.removeDeprecatedAttrs": {
"type": "boolean",
"default": true,
"description": "Removes deprecated attributes from elements in the document. This plugin does not remove attributes from the deprecated XLink namespace. To remove them, use the removeXlink plugin."
},
"svgo.removeDesc": {
"type": "boolean",
"default": true,
"description": "Remove <desc>"
},
"svgo.removeDimensions": {
"type": "boolean",
"default": false,
"description": "Removes the width and height attribute from the top-most <svg> element if specified, and replaces it with the viewBox attribute if it's missing."
},
"svgo.removeDoctype": {
"type": "boolean",
"default": true,
"description": "Removes the Document Type Definition, also known as the DOCTYPE, from the document."
},
"svgo.removeEditorsNSData": {
"type": "boolean",
"default": true,
"description": "Removes all XML namespaces, elements, and attributes associated with popular vector editing software. This plugin is completely safe to use before redistributing your SVG or incorporating it into a larger document."
},
"svgo.removeElementsByAttr": {
"type": "boolean",
"default": false,
"description": "Removes arbitrary elements by ID or className."
},
"svgo.removeEmptyAttrs": {
"type": "boolean",
"default": true,
"description": "Remove empty attributes from elements in the document."
},
"svgo.removeEmptyContainers": {
"type": "boolean",
"default": true,
"description": "Remove container elements in the document that have no children or meaningful attributes, excluding the <svg> element which is ignored."
},
"svgo.removeEmptyText": {
"type": "boolean",
"default": true,
"description": "Removes empty <text> and <tspan> elements, and <tref> elements that don't reference another node in the document."
},
"svgo.removeHiddenElems": {
"type": "boolean",
"default": true,
"description": "Remove hidden or invisible elements from the document. This can be elements with 0 width and height defined, or elements that were just hidden with CSS."
},
"svgo.removeMetadata": {
"type": "boolean",
"default": true,
"description": "Removes the <metadata> element from the document. Metadata doesn't effect rendering. From an optimization perspective, these can always be safely removed."
},
"svgo.removeNonInheritableGroupAttrs": {
"type": "boolean",
"default": true,
"description": "Removes non-inheritable presentation attributes from groups."
},
"svgo.removeOffCanvasPaths": {
"type": "boolean",
"default": false,
"description": "If a viewBox is present, removes <path> elements that are drawn outside of it. Elements with a transform attribute are ignored, to avoid falsely removing elements that are brought into view through styles or an animation."
},
"svgo.removeRasterImages": {
"type": "boolean",
"default": false,
"description": "Removes inline JPEGs, PNGs, and GIFs from the document."
},
"svgo.removeScriptElement": {
"type": "boolean",
"default": false,
"description": "Removes all scripts from the document. SVGs can be interactive through JavaScript. However, unless the SVG is coming from a trusted source, it's strongly advised to strip off JavaScript to avoid XSS attacks."
},
"svgo.removeStyleElement": {
"type": "boolean",
"default": false,
"description": "Remove all <style> elements from the document."
},
"svgo.removeTitle": {
"type": "boolean",
"default": true,
"description": "Removes the <title> element from the document. This plugin may have significant accessibility implications. The purpose of <title> is to provide users of assistive technologies the means to get a summary of the SVG if they're not able to view it."
},
"svgo.removeUnknownsAndDefaults": {
"type": "boolean",
"default": true,
"description": "Removes unknown elements and attributes, as well as attributes that are set to their default value. This can also remove defaults from the XML declaration if present in the document, namely standalone if it's set to no."
},
"svgo.removeUnusedNS": {
"type": "boolean",
"default": true,
"description": "Removes unused namespace declarations from the document."
},
"svgo.removeUselessDefs": {
"type": "boolean",
"default": true,
"description": "Removes children of <defs> element that do not have an ID to reference."
},
"svgo.removeUselessStrokeAndFill": {
"type": "boolean",
"default": true,
"description": "Removes useless stroke and fill attributes. Assigning these attributes can sometimes change nothing in the document. For example, in most cases assigning a stroke color is redundant if the elements stroke-width or stroke-opacity is 0."
},
"svgo.removeViewBox": {
"type": "boolean",
"default": true,
"description": "Removes the viewBox attribute where it matches the documents width and height."
},
"svgo.removeXMLNS": {
"type": "boolean",
"default": false,
"description": "Removes the xmlns attribute from the top-most <svg> element in the document. It's recommended to use this plugin if you intend to inline SVGs into an HTML document. HTML does not support explicit namespaces, so these are ignored by the browser anyway."
},
"svgo.removeXMLProcInst": {
"type": "boolean",
"default": true,
"description": "Removes the XML declaration from the document. The SVG language is based on XML, and is XML compatible, so editors often include an XML declaration. An XML declaration is the line at the top of an XML file to indicate document meta-data, like encoding and which version of the XML specifications it adheres to."
},
"svgo.removeXlink": {
"type": "boolean",
"default": true,
"description": "Removes XLink namespace prefixes and converts references to XLink attributes to the native SVG equivalent."
},
"svgo.reusePaths": {
"type": "boolean",
"default": false,
"description": "Creates a definition for similar paths, and swaps the <path> elements to <use> elements that will reference a single <path> definition."
},
"svgo.sortAttrs": {
"type": "boolean",
"default": true,
"description": "Sorts attributes in all elements in the document. This does not reduce the size of the SVG, but improves readability and may improve how compression algorithms perform on it."
},
"svgo.sortDefsChildren": {
"type": "boolean",
"default": true,
"description": "Sorts all children in the <defs> element. This does not reduce the size of the SVG, but may improve how compression algorithms perform on it."
}
}
},
"menus": {
"editor/context": [
{
"when": "resourceLangId == xml || editorLangId == xml",
"command": "svgo.minify",
"group": "1_modification"
},
{
"when": "resourceLangId == xml || editorLangId == xml",
"command": "svgo.format",
"group": "1_modification"
}
]
}
},
"xo": {
"space": 2,
"rules": {
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/no-empty-function": "off"
}
},
"dependencies": {
"lodash.merge": "^4.6.2",
"svgo": "^4.0.0-rc.1"
},
"devDependencies": {
"@types/lodash.merge": "^4.6.9",
"@types/vscode": "^1.93.0",
"typescript": "^5.6.2",
"xo": "^0.59.3"
},
"engines": {
"vscode": "^1.82.0"
},
"icon": "img/icon.png"
}