-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpackage.json
245 lines (245 loc) · 11.1 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
{
"name": "prettyxml",
"displayName": "Pretty XML",
"author": {
"name": "Prateek Mahendrakar"
},
"readme": "https://github.com/pmahend1/PrettyXML/blob/main/README.md",
"description": "XML formatter extension for Visual Studio Code. Formats XML documents just like Visual Studio.",
"version": "5.3.0",
"publisher": "PrateekMahendrakar",
"repository": {
"url": "https://github.com/pmahend1/prettyxml.git"
},
"icon": "images/logo.png",
"license": "MIT",
"bugs": "https://github.com/pmahend1/prettyxml/issues",
"preview": false,
"galleryBanner": {
"color": "#445678",
"theme": "dark"
},
"markdown": "standard",
"keywords": [
"xml",
"xaml",
"xsd",
"xsl",
"plist",
"mobileconfig",
"config",
"csproj",
"axml",
"resx",
"formatter"
],
"engines": {
"vscode": "^1.97.0"
},
"categories": [
"Formatters"
],
"activationEvents": [
"onLanguage:xml",
"workspaceContains:**/*.xml",
"workspaceContains:**/*.xaml"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "prettyxml.prettifyxml",
"title": "Prettify XML"
},
{
"command": "prettyxml.minimizexml",
"title": "Pretty XML: Minimize"
}
],
"keybindings": [
{
"command": "prettyxml.prettifyxml",
"key": "ctrl+k l",
"when": "!isMac"
},
{
"command": "prettyxml.prettifyxml",
"key": "cmd+k l",
"when": "isMac"
},
{
"command": "prettyxml.minimizexml",
"key": "ctrl+k `",
"when": "!isMac"
},
{
"command": "prettyxml.minimizexml",
"key": "cmd+k `",
"when": "isMac"
}
],
"languages": [
{
"id": "xml",
"extensions": [
".config",
".csproj",
".xml",
".xsd",
".xsl",
".plist",
".mobileconfig",
".xaml",
".axml",
".axaml",
".resx",
".svg"
]
}
],
"menus": {
"editor/context": [
{
"command": "prettyxml.prettifyxml",
"group": "1_modification@100",
"when": "editorLangId == 'xml' || editorLangId == 'xaml'"
}
]
},
"configuration": [
{
"title": "PrettyXML Settings",
"properties": {
"prettyxml.settings.indentSpaceLength": {
"type": "number",
"default": 4,
"enum": [
2,
4,
8
],
"markdownDescription": "No. of spaces for indentation. *Default* is *4*"
},
"prettyxml.settings.useSingleQuotes": {
"type": "boolean",
"markdownDescription": "Use apostrophe `'` instead of quotes `\"`. *Default* is *Unchecked* \n\n **Checked** : `Attribute='Value'` \n\n **Unchecked** : `Attribute=\"Value\"`",
"default": false
},
"prettyxml.settings.useSelfClosingTag": {
"type": "boolean",
"markdownDescription": "If no child nodes then use self closing tag `/>`. *Default* is *Checked* \n\n **Checked** : `<Foo></Foo>` → `<Foo/>` \n\n **Unchecked** : `<Foo></Foo>` → `<Foo></Foo>` ",
"default": true
},
"prettyxml.settings.formatOnSave": {
"type": "boolean",
"markdownDescription": "Enable format on save. *Default* is *Unchecked*",
"default": false
},
"prettyxml.settings.allowSingleQuoteInAttributeValue": {
"type": "boolean",
"markdownDescription": "Allow single quote in attribute values. Ignored if *Use Single Quotes* is *Checked*. *Default* is *Checked* \n\n **Checked** : `Attribute=\"Value'has'apostrphoes\"` \n\n **Unchecked** : `Attribute=\"Value'has'apostrphoes\"` \n\n ",
"default": true
},
"prettyxml.settings.addSpaceBeforeSelfClosingTag": {
"type": "boolean",
"markdownDescription": "Add space before self closing tag. *Default* is *Checked* \n\n **Checked** : `<Foo />` \n\n **Unchecked** : `<Foo/>` ",
"default": true
},
"prettyxml.settings.wrapCommentTextWithSpaces": {
"type": "boolean",
"markdownDescription": "Wrap Comment text with spaces. Ignored if *Preserve White Spaces In Comment* is *Checked*. *Default* is *Checked* \n\n **Checked** : `<!-- Comment Text -->` \n\n **Unchecked** : `<!--Comment Text-->` ",
"default": true
},
"prettyxml.settings.allowWhiteSpaceUnicodesInAttributeValues": {
"type": "boolean",
"markdownDescription": "Allow unicode whitespace characters in attribute values. *Default* is *Checked* \n\n **Checked** : \n\n ` ` → `
` \n\n `	` or `	` → `	` \n\n `>` → `>` \n\n **Unchecked** :\n\n ` ` → new line \n\n `	` or `	` → tab \n\n > → `>`",
"default": true
},
"prettyxml.settings.positionFirstAttributeOnSameLine": {
"type": "boolean",
"markdownDescription": "Position first attribute on same line. *Unchecked* on this setting will be ignored if *Position All Attributes On First Line*=*Checked*. *Default* is *Checked* \n\n **Checked** : \n\n `<Element Attribute=\"Value\"` \n\n **Unchecked** : \n\n `<Element` \n\n    `Attribute=\"Value\"` ",
"default": true
},
"prettyxml.settings.positionAllAttributesOnFirstLine": {
"type": "boolean",
"markdownDescription": "Position all attributes on same line as element. Setting this to *Checked* will ignore *Position First Attribute On Same Line*=*Unchecked*. *Default* is *Unchecked.* \n\n **Checked** : \n\n `<Element Attribute1=\"Value1\" Attribute2=\"Value2\"` \n\n **Unchecked** :\n\n`<Element Attribute1=\"Value1\"`\n\n         `Attribute2=\"Value2\"` ",
"default": false
},
"prettyxml.settings.wildCardedExceptionsForPositionAllAttributesOnFirstLine": {
"type": "array",
"markdownDescription": "Exceptions for Position all attributes on same line as element. Wildcards accepted.",
"default": []
},
"prettyxml.settings.preserveWhiteSpacesInComment": {
"type": "boolean",
"markdownDescription": "Preserves whitespaces in comment. Setting this *Checked* ignores *Wrap Comment Text With Spaces* setting. Default is *Unchecked* \n\n **Checked** : \n\n `<!--`    `Comment`    `-->` \n\n **Unchecked** : \n\n `<!--Comment-->`",
"default": false
},
"prettyxml.settings.addSpaceBeforeEndOfXmlDeclaration": {
"type": "boolean",
"markdownDescription": "Adds space before end of XML declaration. Default is *Unchecked* \n\n **Checked** : \n\n `<?xml version=\"1.0\" encoding=\"utf-8\" ?>` \n\n **Unchecked** : \n\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>`",
"default": false
},
"prettyxml.settings.attributesInNewlineThreshold": {
"type": "number",
"default": 1,
"enum": [
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"markdownDescription": "Attributes count threshold to position attributes in newlines. Default is *1*. This setting only works when **Position first attribute on same line** is enabled.\n\nFor example if threshold=2, all attributes will be on same line if an element has only 2 attributes,\n\notherwise each attribute will be placed on newline.\n\nMore Info: [GitHub](https://github.com/pmahend1/PrettyXML?tab=readme-ov-file#attributes-in-newline-threshold)"
},
"prettyxml.settings.addEmptyLineBetweenElements": {
"type": "boolean",
"markdownDescription": "Add empty line between elements if element count is greater than 2. Default is *Unchecked*",
"default": false
},
"prettyxml.settings.enableLogs": {
"type": "boolean",
"markdownDescription": "Enable console local logs.",
"default": false
}
}
}
]
},
"scripts": {
"compile": "webpack --mode development",
"watch": "webpack --mode development --watch",
"vscode:prepublish": "npm run package",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"pretest": "npm run compile-tests",
"test": "vscode-test"
},
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.13.4",
"@types/vscode": "^1.97.0",
"@typescript-eslint/eslint-plugin": "^8.24.1",
"@typescript-eslint/parser": "8.24.1",
"@vscode/test-electron": "^2.4.1",
"esbuild": "^0.25.0",
"eslint": "^9.20.1",
"glob": "^11.0.1",
"mocha": "^11.1.0",
"ts-loader": "^9.5.2",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^6.0.1"
},
"dependencies": {
"child_process": "^1.0.2",
"compare-versions": "^6.1.1",
"fs": "0.0.1-security",
"path": "^0.12.7"
}
}