-
Notifications
You must be signed in to change notification settings - Fork 41
/
package.json
401 lines (401 loc) · 12.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
{
"name": "minapp-vscode",
"displayName": "WXML - Language Service",
"description": "WXML Language Support",
"version": "2.4.13",
"publisher": "qiu8310",
"extensionKind": [
"workspace"
],
"scripts": {
"build:vsix": "npx vsce package",
"vscode:prepublish": "npm run clear && webpack --mode production",
"webpack": "webpack --mode development",
"webpack-dev": "webpack --mode development --watch",
"test-compile": "npm run clear && tsc -p ./",
"watch": "tsc -watch -p ./",
"lint": "eslint --ext .ts,.tsx ./src",
"clear": "rm -rf ./dist"
},
"keywords": [
"微信",
"小程序",
"minapp",
"wxml",
"wxss",
"wxs",
"wechat",
"wexin"
],
"license": "MIT",
"sponsor": {
"url": "https://www.paypal.com/paypalme/iChenLei"
},
"author": "Mora <qiuzhongleiabc@126.com> (https://github.com/qiu8310)",
"maintainers": [
{
"name": "Lei Chen",
"email": "chenleicoder@foxmail.com",
"url": "https://github.com/iChenLei"
}
],
"bugs": "https://github.com/wx-minapp/minapp-vscode/issues",
"homepage": "https://github.com/wx-minapp/minapp-vscode",
"repository": {
"type": "git",
"url": "https://github.com/wx-minapp/minapp-vscode"
},
"engines": {
"vscode": "^1.59.1"
},
"icon": "res/icon.png",
"categories": [
"Programming Languages"
],
"activationEvents": [
"workspaceContains:**/project.config.json",
"workspaceContains:**/app.wxss",
"onLanguage:wxml-pug",
"onLanguage:wxml",
"onLanguage:vue"
],
"main": "./dist/extension",
"contributes": {
"configuration": {
"title": "minapp-vscode",
"properties": {
"minapp-vscode.disableCustomComponentAutocomponent": {
"type": "boolean",
"description": "禁止自定义组件的自动补全(自定义组件自动补全需要遍历组件文件,可能会影响性能)",
"default": false
},
"minapp-vscode.resolveRoots": {
"type": "array",
"description": "解析文件引用关系用的根目录",
"default": [
"node_modules",
"src"
],
"items": {
"type": "string"
}
},
"minapp-vscode.showSuggestionOnEnter": {
"type": "boolean",
"description": "是否在按下 Enter 键后出自动补全(更新此配置后需要重启 vscode 才能生效)",
"default": false
},
"minapp-vscode.linkAttributeNames": {
"type": "array",
"description": "指定 link 功能作用的标签属性,默认有 src,即 src 后面的路径会当作一个文件路径来解析;设置为空数组可以禁用 link 功能",
"default": [
"src"
],
"items": {
"type": "string"
}
},
"minapp-vscode.formatMaxLineCharacters": {
"type": "number",
"description": "格式化时,单行允许的最长的长度(只针对默认的格式化工具)",
"default": 100
},
"minapp-vscode.reserveTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "格式化时,不处理的标签,即保持标签中的内容和格式化前一模一样,不会出现多余的换行(只针对默认的格式化工具)",
"default": []
},
"minapp-vscode.disableDecorate": {
"type": "boolean",
"description": "禁用模板文件中 js 变量自定义样式的功能",
"default": true
},
"minapp-vscode.decorateComplexInterpolation": {
"type": "boolean",
"description": "如果设置为 true, 则如果 {{ }} 中是表达式,也添加指定的样式;否则只会匹配 {{ }} 中的为单个变量的情况",
"default": true
},
"minapp-vscode.decorateType": {
"type": "object",
"description": "指定模板文件中 js 变量装饰的样式。可配置的属性有 https://code.visualstudio.com/docs/extensionAPI/vscode-api#DecorationRenderOptions",
"default": {
"color": "#ba68c8"
}
},
"minapp-vscode.snippets": {
"type": "object",
"description": "自定义 snippets,与系统 snippets 配置类似(注意:如果 key 和默认提供的 snippet 重复,会覆盖掉默认的)",
"default": {
"wxml": {
"open-data": {
"body": "<open-data type=\"${1|groupName,userNickName,userAvatarUrl,userGender,userCity,userProvince,userCountry,userLanguage|}\" lang=\"${2|en,zh_CN,zh_TW|}\" />$0"
}
},
"pug": {
"open-data": {
"body": "open-data(type=\"${1|groupName,userNickName,userAvatarUrl,userGender,userCity,userProvince,userCountry,userLanguage|}\" lang=\"${2|en,zh_CN,zh_TW|}\")$0"
}
}
}
},
"minapp-vscode.disableAutoConfig": {
"type": "boolean",
"description": "默认在启动时会自动相关文件关联的配置项,配置成功后会将此配置自动设置成 true,避免下次启动再重新配置",
"default": false
},
"minapp-vscode.selfCloseTags": {
"type": "array",
"description": "指定自我闭合的标签,用于自动补全时生成代码",
"items": {
"type": "string"
},
"default": [
"icon",
"progress",
"checkbox",
"input",
"radio",
"slider",
"switch",
"audio",
"image",
"video",
"camera",
"live-player",
"live-pusher",
"map",
"canvas",
"web-view",
"open-data"
]
},
"minapp-vscode.wxmlQuoteStyle": {
"type": "string",
"default": "\"",
"description": "自定义 wxml 自动补全是生成的引号"
},
"minapp-vscode.pugQuoteStyle": {
"type": "string",
"default": "'",
"description": "自定义 pug 自动补全是生成的引号"
},
"minapp-vscode.globalStyleFiles": {
"type": "array",
"items": {
"type": "string"
},
"description": "全局的样式文件,系统会自动从这些指定的文件中获取 className,用于模板中的 class 补全"
},
"minapp-vscode.wxmlExtname": {
"type": "string",
"default": "wxml",
"enum": [
"wxml",
"vue",
"wpy"
],
"description": "创建小程序组件时候wxml文件类型,默认为.wxml"
},
"minapp-vscode.jsExtname": {
"type": "string",
"default": "js",
"enum": [
"js",
"ts",
"coffee"
],
"description": "创建小程序组件时候js文件类型,默认为.js"
},
"minapp-vscode.cssExtname": {
"type": "string",
"default": "wxss",
"enum": [
"wxss",
"css",
"styl",
"less",
"sass",
"scss"
],
"description": "创建小程序组件时候css样式文件类型,默认为.wxss"
},
"minapp-vscode.styleExtensions": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"wxss",
"css",
"less",
"scss",
"sass",
"styl"
],
"description": "当前样式文件的后缀中,系统会自动查找和当前模板同名的样式文件,用于模板中的 class 补全"
},
"minapp-vscode.disableFormat": {
"type": "boolean",
"description": "禁止插件的format功能",
"default": false
},
"minapp-vscode.wxmlFormatter": {
"type": "string",
"default": "wxml",
"enum": [
"wxml",
"prettier",
"prettyHtml",
"jsBeautifyHtml"
],
"description": "wxml 格式化工具"
},
"minapp-vscode.jsBeautifyHtml": {
"type": ["string", "object"],
"default": {
"content_unformatted": "text",
"wrap_attributes": "force",
"indent_size": 2,
"wrap_attributes_indent_size": 2,
"void_elements": "image,input,video",
"indent_scripts": "keep"
},
"enum": [
"useCodeBuiltInHTML",
{
"content_unformatted": "text",
"wrap_attributes": "force",
"indent_size": 2,
"wrap_attributes_indent_size": 2,
"void_elements": "image,input,video",
"indent_scripts": "keep"
}
],
"description": "js-beautify.html 配置"
},
"minapp-vscode.prettyHtml": {
"type": "object",
"default": {
"useTabs": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": false,
"usePrettier": true,
"wrapAttributes": false,
"sortAttributes": false
},
"description": "prettyHtml 配置"
},
"minapp-vscode.prettier": {
"type": "object",
"default": {
"parser": "html",
"useTabs": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": false
},
"description": "prettier 配置"
},
"minapp-vscode.documentSelector": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"default": [
"wxml"
],
"description": "关联的文件类型,默认关联 wxml,如可以加上 html,这样在 html 中也可以有 wxml 的功能"
},
"minapp-vscode.sass": {
"type": "object",
"description": "scss/sass 配置,用于解析 scss/sass 文件,方便样式名称在 wxml 模板中自动补全"
}
}
},
"menus": {
"explorer/context": [
{
"command": "minapp-vscode.createMiniprogramComponent",
"group": "navigation@10",
"when": "minapp-vscode:init && resourceExtname == '' && activeViewlet == 'workbench.view.explorer'"
}
]
},
"commands": [
{
"command": "minapp-vscode.createMiniprogramComponent",
"title": "New Miniprogram Component",
"category": "minapp-vscode"
}
],
"themes": [],
"languages": [
{
"id": "wxml",
"extensions": [
".wxml"
],
"configuration": "./syntaxes/wxml.language-configuration.json"
},
{
"id": "wxml-pug",
"extensions": [
".wpug",
".pug"
],
"configuration": "./syntaxes/wxml-pug.language-configuration.json"
}
],
"grammars": [
{
"language": "wxml",
"scopeName": "text.html.wxml",
"path": "./syntaxes/wxml.tmLanguage.json",
"embeddedLanguages": {
"text.html": "html",
"source.js": "js"
}
},
{
"language": "wxml-pug",
"scopeName": "text.jade.wxml",
"path": "./syntaxes/wxml-pug.tmLanguage.json",
"embeddedLanguages": {
"text.html": "html",
"source.js": "js"
}
}
]
},
"dependencies": {
"json5": "^2.2.3",
"prettier": "^1.19.1",
"read-pkg-up": "^7.0.1",
"resolve": "^1.20.0",
"tslib": "^2.3.1"
},
"devDependencies": {
"@types/js-beautify": "^1.13.3",
"@types/mocha": "^9.1.1",
"@types/prettier": "^1.19.1",
"@types/resolve": "1.20.1",
"@types/sass": "~1.16.1",
"@types/vscode": "^1.59.0",
"@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.29.3",
"@vscode/test-electron": "^1.6.2",
"@vscode/vsce": "^2.18.0",
"eslint": "7.32.0",
"js-beautify": "^1.14.7",
"mocha": "^10.0.0",
"ts-loader": "^9.2.6",
"typescript": "^4.4.4",
"webpack": "^5.77.0",
"webpack-cli": "^5.0.1"
}
}