-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
185 lines (185 loc) · 6.95 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
{
"id": "tinypng-compress",
"name": "tinypng",
"description": "无损图片压缩,支持选中单个文件、多个文件、目录进行压缩,支持压缩网络url图片",
"displayName": "TinyPng - 无损压缩png/jpg/Webp图片",
"version": "2.2.1",
"publisher": "OneOne",
"engines": {
"HBuilderX": "^2.7.0"
},
"categories": [
"Other"
],
"main": "./extension",
"activationEvents": [
"onCommand:extension.tinypngCompress",
"onCommand:extension.tinypngClipboard",
"onCommand:extension.tinypngNetworkPictures",
"onCommand:extension.tinypngSelectedLocalDir",
"onCommand:extension.tinypngHelp",
"onCommand:extension.tinypngSelected",
"onCommand:extension.tinypngEditorRightMenuConfig",
"onCommand:extension.tinypngforceOverwriteConfig",
"onCommand:extension.tinypngSetAPIkey"
],
"contributes": {
"configuration": {
"title": "TinyPng - png/jpg图片压缩",
"properties": {
"TinyPng.ApiKey": {
"type": "string",
"default": "",
"description": "TinyPNG Api key <a href='https://tinypng.com/'>官网申请KEY</a>"
},
"TinyPng.compressedFilePostfix": {
"type": "string",
"default": ".min",
"description": "压缩图片后缀, 默认.min,压缩后的文件名为: exmample.min.png"
},
"TinyPng.forceOverwrite": {
"type": "boolean",
"default": false,
"description": "压缩完成后,是否强制写入覆盖原图片, 默认为false"
},
"TinyPng.isShowEditorRightMenu": {
"type": "boolean",
"default": true,
"description": "编辑器右键菜单显示 TinyPng菜单, 默认为true"
}
}
},
"keybindings": [
{
"command": "extension.tinypngCompress",
"key": "Ctrl+Alt+C",
"when": "expression.filelimit",
"macosx": "Command+Alt+C"
}
],
"commands": [
{
"command": "extension.tinypngCompress",
"title": "TinyPNG: 压缩"
},
{
"command": "extension.tinypngClipboard",
"title": "TinyPNG: 剪切板本地图片/目录"
},
{
"command": "extension.tinypngNetworkPictures",
"title": "TinyPNG: 网络地址图片"
},
{
"command": "extension.tinypngSelectedLocalDir",
"title": "TinyPNG: 选择本地目录"
},
{
"command": "extension.tinypngSelected",
"title": "TinyPNG: 编辑器光标选中内容"
},
{
"command": "extension.tinypngforceOverwriteConfig",
"title": "TinyPNG: 压缩后是否强制覆盖原图"
},
{
"command": "extension.tinypngEditorRightMenuConfig",
"title": "TinyPNG: 编辑器右键菜单是否显示TinyPNG"
},
{
"command": "extension.tinypngSetAPIkey",
"title": "TinyPNG: 设置API Key"
},
{
"command": "extension.tinypngHelp",
"title": "TinyPNG: 关于插件/评价"
}
],
"expressions": {
"filelimit": "!explorerResourceIsWorkspaceFolder && (explorerResourceIsFolder || ...workspaceFolderRelativePath =~ /(([p|P][n|N][g|G])|([j|J][P|p][g|G])|([j|J][P|p][e|E][g|G])|webp)$/i )"
},
"menus": {
"explorer/context": [
{
"command": "extension.tinypngCompress",
"title": "TinyPNG 无损压缩 (选中目录或图片)",
"group": "z_commands",
"when": "expression.filelimit"
}
],
"editor/context": [
{
"command": "extension.tinypngSelected",
"title": "TinyPNG 无损压缩(光标选中内容)",
"group": "copy",
"when": "config.TinyPng.isShowEditorRightMenu && editorHasSelection"
},
{
"group": "copy"
}
],
"menubar/tool": [
{
"title": "TinyPNG 无损压缩",
"group": "ext_settings",
"id": "tinypng"
},
{
"command": "extension.tinypngSelectedLocalDir",
"title": "压缩:选择本地目录",
"group": "tinypng@1"
},
{
"command": "extension.tinypngClipboard",
"title": "压缩:剪切板内容 (本地图片/目录路径)",
"group": "tinypng@1"
},
{
"command": "extension.tinypngNetworkPictures",
"title": "压缩:网络地址图片",
"group": "tinypng@2"
},
{
"command": "extension.tinypngSelected",
"title": "编辑器光标选中的图片路径",
"group": "tinypng@2",
"when": "editorHasSelection"
},
{
"group": "tinypng@3"
},
{
"command": "extension.tinypngSetAPIkey",
"title": "设置TinyPNG API key",
"group": "tinypng@1"
},
{
"command": "extension.tinypngEditorRightMenuConfig",
"title": "编辑器右键菜单显示TinyPng",
"group": "tinypng@3",
"checked": "config.TinyPng.isShowEditorRightMenu"
},
{
"command": "extension.tinypngforceOverwriteConfig",
"title": "压缩后是否强制覆盖原图",
"group": "tinypng@4",
"checked": "config.TinyPng.forceOverwrite"
},
{
"group": "tinypng@5"
},
{
"command": "extension.tinypngHelp",
"title": "关于插件/评价",
"group": "tinypng@6"
}
]
}
},
"extensionDependencies": [
"plugin-manager"
],
"dependencies": {
"tinify": "^1.6.0-beta.2"
}
}