material-icon-theme 4.26.0 → 4.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/material-icons.json +5742 -0
- package/icons/file.svg +1 -0
- package/icons/folder-mojo-open.svg +2 -0
- package/icons/folder-mojo.svg +2 -0
- package/icons/folder-open.svg +1 -0
- package/icons/folder-root-open.svg +1 -0
- package/icons/folder-root.svg +1 -0
- package/icons/folder.svg +1 -0
- package/icons/ifanr-cloud.svg +10 -0
- package/icons/mermaid.svg +4 -0
- package/icons/mojo.svg +2 -0
- package/icons/qwik.svg +2 -0
- package/icons/unocss.svg +12 -0
- package/package.json +7 -1
- package/.eslintignore +0 -1
- package/.eslintrc.json +0 -51
- package/.github/FUNDING.yml +0 -3
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
- package/.github/ISSUE_TEMPLATE/icon_request.md +0 -27
- package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -7
- package/.github/workflows/build.yml +0 -45
- package/.github/workflows/color-check.yml +0 -22
- package/.github/workflows/release.yml +0 -73
- package/.prettierrc +0 -7
- package/.vscode/extensions.json +0 -3
- package/.vscode/launch.json +0 -43
- package/.vscode/settings.json +0 -14
- package/.vscode/tasks.json +0 -32
- package/.vscodeignore +0 -22
- package/CHANGELOG.md +0 -1343
- package/CONTRIBUTING.md +0 -232
- package/build/web-extension.webpack.config.js +0 -62
- package/build/webpack.config.js +0 -39
- package/changelog.config.json +0 -4
- package/images/commandPalette.png +0 -0
- package/images/contributors.png +0 -0
- package/images/fileIcons.png +0 -0
- package/images/folderIcons.png +0 -0
- package/images/how-tos/folder-icon-parts.png +0 -0
- package/images/how-tos/pick-folder-colors.png +0 -0
- package/images/how-tos/pick-folder-colors.svg +0 -301
- package/images/how-tos/svg-folder-icon-with-correct-colors.png +0 -0
- package/images/how-tos/svg-folder-icon-with-wrong-colors.png +0 -0
- package/images/how-tos/svg-with-light-color.png +0 -0
- package/images/how-tos/svg-with-spacing.png +0 -0
- package/images/how-tos/svg-with-too-dark-color.png +0 -0
- package/images/how-tos/svg-with-wrong-color.png +0 -0
- package/images/how-tos/svg-without-spacing.png +0 -0
- package/images/set-folder-color.gif +0 -0
- package/images/set-folder-theme.gif +0 -0
- package/logo.png +0 -0
- package/logo.svg +0 -21
- package/material-colors.yml +0 -257
- package/package.nls.de.json +0 -34
- package/package.nls.es.json +0 -29
- package/package.nls.fr.json +0 -29
- package/package.nls.ja.json +0 -32
- package/package.nls.json +0 -34
- package/package.nls.nl.json +0 -32
- package/package.nls.pl.json +0 -32
- package/package.nls.pt-BR.json +0 -29
- package/package.nls.pt-PT.json +0 -29
- package/package.nls.ru.json +0 -29
- package/package.nls.zh-CN.json +0 -29
- package/package.nls.zh-TW.json +0 -29
- package/src/commands/activate.ts +0 -28
- package/src/commands/explorerArrows.ts +0 -55
- package/src/commands/fileColor.ts +0 -96
- package/src/commands/folderColor.ts +0 -96
- package/src/commands/folders.ts +0 -55
- package/src/commands/grayscale.ts +0 -55
- package/src/commands/iconPacks.ts +0 -64
- package/src/commands/index.ts +0 -32
- package/src/commands/opacity.ts +0 -46
- package/src/commands/restoreConfig.ts +0 -15
- package/src/commands/saturation.ts +0 -46
- package/src/extension.ts +0 -37
- package/src/helpers/changeDetection.ts +0 -109
- package/src/helpers/customIcons.ts +0 -8
- package/src/helpers/fileConfig.ts +0 -38
- package/src/helpers/index.ts +0 -88
- package/src/helpers/objects.ts +0 -58
- package/src/helpers/types.ts +0 -7
- package/src/i18n/index.ts +0 -78
- package/src/i18n/lang-de.ts +0 -45
- package/src/i18n/lang-en.ts +0 -45
- package/src/i18n/lang-es.ts +0 -45
- package/src/i18n/lang-fr.ts +0 -45
- package/src/i18n/lang-ja.ts +0 -45
- package/src/i18n/lang-nl.ts +0 -45
- package/src/i18n/lang-pl.ts +0 -45
- package/src/i18n/lang-pt-br.ts +0 -45
- package/src/i18n/lang-pt-pt.ts +0 -45
- package/src/i18n/lang-ru.ts +0 -45
- package/src/i18n/lang-uk.ts +0 -45
- package/src/i18n/lang-zh-cn.ts +0 -45
- package/src/i18n/lang-zh-tw.ts +0 -45
- package/src/icons/fileIcons.ts +0 -2294
- package/src/icons/folderIcons.ts +0 -835
- package/src/icons/generator/constants.ts +0 -29
- package/src/icons/generator/fileGenerator.ts +0 -233
- package/src/icons/generator/folderGenerator.ts +0 -340
- package/src/icons/generator/iconOpacity.ts +0 -111
- package/src/icons/generator/iconSaturation.ts +0 -140
- package/src/icons/generator/index.ts +0 -7
- package/src/icons/generator/jsonGenerator.ts +0 -207
- package/src/icons/generator/languageGenerator.ts +0 -127
- package/src/icons/index.ts +0 -4
- package/src/icons/languageIcons.ts +0 -144
- package/src/models/i18n/index.ts +0 -1
- package/src/models/i18n/translation.ts +0 -43
- package/src/models/iconConfiguration.ts +0 -37
- package/src/models/icons/defaultIcon.ts +0 -16
- package/src/models/icons/files/fileIcon.ts +0 -49
- package/src/models/icons/files/fileTypes.ts +0 -14
- package/src/models/icons/files/index.ts +0 -2
- package/src/models/icons/folders/folderIcon.ts +0 -34
- package/src/models/icons/folders/folderTheme.ts +0 -23
- package/src/models/icons/folders/index.ts +0 -2
- package/src/models/icons/iconJsonOptions.ts +0 -22
- package/src/models/icons/iconPack.ts +0 -12
- package/src/models/icons/index.ts +0 -6
- package/src/models/icons/languages/index.ts +0 -1
- package/src/models/icons/languages/languageIdentifier.ts +0 -26
- package/src/models/index.ts +0 -3
- package/src/models/scripts/contributors/contributor.ts +0 -22
- package/src/models/scripts/contributors/contributorsConfig.ts +0 -10
- package/src/scripts/contributors/contributors.css +0 -24
- package/src/scripts/contributors/index.ts +0 -138
- package/src/scripts/helpers/painter.ts +0 -5
- package/src/scripts/helpers/screenshots.ts +0 -32
- package/src/scripts/helpers/similarity.ts +0 -47
- package/src/scripts/helpers/titleCase.ts +0 -7
- package/src/scripts/icons/checks/checkIconAvailability.ts +0 -215
- package/src/scripts/icons/checks/checkIconConflicts.ts +0 -152
- package/src/scripts/icons/checks/checkIconUsage.ts +0 -137
- package/src/scripts/icons/checks/index.ts +0 -7
- package/src/scripts/icons/generateJson.ts +0 -11
- package/src/scripts/preview/index.ts +0 -40
- package/src/scripts/preview/preview.ts +0 -163
- package/src/scripts/preview/style.css +0 -48
- package/src/test/runTest.ts +0 -26
- package/src/test/spec/i18n/i18n.spec.ts +0 -54
- package/src/test/spec/icons/fileIcons.spec.ts +0 -250
- package/src/test/spec/icons/folderIcons.spec.ts +0 -418
- package/src/test/spec/icons/languageIcons.spec.ts +0 -184
- package/src/test/spec/index.ts +0 -36
- package/src/web/extension.ts +0 -10
- package/svgo.config.js +0 -12
- package/tsconfig.json +0 -23
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
import { deepStrictEqual } from 'assert';
|
|
2
|
-
import merge from 'lodash.merge';
|
|
3
|
-
import {
|
|
4
|
-
getDefaultIconOptions,
|
|
5
|
-
loadFolderIconDefinitions,
|
|
6
|
-
} from '../../../icons/index';
|
|
7
|
-
import {
|
|
8
|
-
FolderTheme,
|
|
9
|
-
IconConfiguration,
|
|
10
|
-
IconPack,
|
|
11
|
-
} from '../../../models/index';
|
|
12
|
-
|
|
13
|
-
describe('folder icons', () => {
|
|
14
|
-
let folderIcons: FolderTheme[];
|
|
15
|
-
let expectedConfig: IconConfiguration;
|
|
16
|
-
|
|
17
|
-
before(() => {
|
|
18
|
-
folderIcons = [
|
|
19
|
-
{
|
|
20
|
-
name: 'specific',
|
|
21
|
-
defaultIcon: { name: 'folder' },
|
|
22
|
-
rootFolder: { name: 'folder-root' },
|
|
23
|
-
icons: [
|
|
24
|
-
{ name: 'folder-src', folderNames: ['src', 'source'] },
|
|
25
|
-
{
|
|
26
|
-
name: 'folder-angular',
|
|
27
|
-
folderNames: ['angular', 'ng'],
|
|
28
|
-
enabledFor: [IconPack.Angular, IconPack.Ngrx],
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'blue',
|
|
34
|
-
defaultIcon: { name: 'folder-blue' },
|
|
35
|
-
icons: [{ name: 'folder-blue-src', folderNames: ['src', 'source'] }],
|
|
36
|
-
},
|
|
37
|
-
{ name: 'classic', defaultIcon: { name: 'folder' } },
|
|
38
|
-
{ name: 'none', defaultIcon: { name: '' } },
|
|
39
|
-
];
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
beforeEach(() => {
|
|
43
|
-
expectedConfig = merge({}, new IconConfiguration(), {
|
|
44
|
-
options: getDefaultIconOptions(),
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it('should configure icon definitions', () => {
|
|
49
|
-
const options = getDefaultIconOptions();
|
|
50
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
51
|
-
const iconDefinitions = loadFolderIconDefinitions(
|
|
52
|
-
folderIcons,
|
|
53
|
-
iconConfig,
|
|
54
|
-
options
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
expectedConfig.iconDefinitions = {
|
|
58
|
-
folder: {
|
|
59
|
-
iconPath: './../icons/folder.svg',
|
|
60
|
-
},
|
|
61
|
-
'folder-open': {
|
|
62
|
-
iconPath: './../icons/folder-open.svg',
|
|
63
|
-
},
|
|
64
|
-
'folder-root': {
|
|
65
|
-
iconPath: './../icons/folder-root.svg',
|
|
66
|
-
},
|
|
67
|
-
'folder-root-open': {
|
|
68
|
-
iconPath: './../icons/folder-root-open.svg',
|
|
69
|
-
},
|
|
70
|
-
'folder-src': {
|
|
71
|
-
iconPath: './../icons/folder-src.svg',
|
|
72
|
-
},
|
|
73
|
-
'folder-src-open': {
|
|
74
|
-
iconPath: './../icons/folder-src-open.svg',
|
|
75
|
-
},
|
|
76
|
-
'folder-angular': {
|
|
77
|
-
iconPath: './../icons/folder-angular.svg',
|
|
78
|
-
},
|
|
79
|
-
'folder-angular-open': {
|
|
80
|
-
iconPath: './../icons/folder-angular-open.svg',
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
expectedConfig.folder = 'folder';
|
|
84
|
-
expectedConfig.folderExpanded = 'folder-open';
|
|
85
|
-
expectedConfig.rootFolder = 'folder-root';
|
|
86
|
-
expectedConfig.rootFolderExpanded = 'folder-root-open';
|
|
87
|
-
expectedConfig.folderNames = {
|
|
88
|
-
src: 'folder-src',
|
|
89
|
-
source: 'folder-src',
|
|
90
|
-
angular: 'folder-angular',
|
|
91
|
-
ng: 'folder-angular',
|
|
92
|
-
};
|
|
93
|
-
expectedConfig.folderNamesExpanded = {
|
|
94
|
-
src: 'folder-src-open',
|
|
95
|
-
source: 'folder-src-open',
|
|
96
|
-
angular: 'folder-angular-open',
|
|
97
|
-
ng: 'folder-angular-open',
|
|
98
|
-
};
|
|
99
|
-
expectedConfig.hidesExplorerArrows = false;
|
|
100
|
-
|
|
101
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
it('should deactivate folder icons', () => {
|
|
105
|
-
const options = getDefaultIconOptions();
|
|
106
|
-
options.folders.theme = 'none';
|
|
107
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
108
|
-
const iconDefinitions = loadFolderIconDefinitions(
|
|
109
|
-
folderIcons,
|
|
110
|
-
iconConfig,
|
|
111
|
-
options
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
expectedConfig.iconDefinitions = {};
|
|
115
|
-
expectedConfig.folderNames = {};
|
|
116
|
-
expectedConfig.folderNamesExpanded = {};
|
|
117
|
-
expectedConfig.hidesExplorerArrows = false;
|
|
118
|
-
expectedConfig.options!.folders!.theme = 'none';
|
|
119
|
-
|
|
120
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
it('should enable folder theme', () => {
|
|
124
|
-
const options = getDefaultIconOptions();
|
|
125
|
-
options.folders.theme = 'blue';
|
|
126
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
127
|
-
const iconDefinitions = loadFolderIconDefinitions(
|
|
128
|
-
folderIcons,
|
|
129
|
-
iconConfig,
|
|
130
|
-
options
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
expectedConfig.iconDefinitions = {
|
|
134
|
-
'folder-blue': {
|
|
135
|
-
iconPath: './../icons/folder-blue.svg',
|
|
136
|
-
},
|
|
137
|
-
'folder-blue-open': {
|
|
138
|
-
iconPath: './../icons/folder-blue-open.svg',
|
|
139
|
-
},
|
|
140
|
-
'folder-blue-src': {
|
|
141
|
-
iconPath: './../icons/folder-blue-src.svg',
|
|
142
|
-
},
|
|
143
|
-
'folder-blue-src-open': {
|
|
144
|
-
iconPath: './../icons/folder-blue-src-open.svg',
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
expectedConfig.folder = 'folder-blue';
|
|
148
|
-
expectedConfig.folderExpanded = 'folder-blue-open';
|
|
149
|
-
expectedConfig.rootFolder = 'folder-blue';
|
|
150
|
-
expectedConfig.rootFolderExpanded = 'folder-blue-open';
|
|
151
|
-
expectedConfig.folderNames = {
|
|
152
|
-
src: 'folder-blue-src',
|
|
153
|
-
source: 'folder-blue-src',
|
|
154
|
-
};
|
|
155
|
-
expectedConfig.folderNamesExpanded = {
|
|
156
|
-
src: 'folder-blue-src-open',
|
|
157
|
-
source: 'folder-blue-src-open',
|
|
158
|
-
};
|
|
159
|
-
expectedConfig.hidesExplorerArrows = false;
|
|
160
|
-
expectedConfig.options!.folders!.theme = 'blue';
|
|
161
|
-
|
|
162
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
it('should configure custom icon associations', () => {
|
|
166
|
-
const options = getDefaultIconOptions();
|
|
167
|
-
options.folders.associations = {
|
|
168
|
-
sample: 'src',
|
|
169
|
-
};
|
|
170
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
171
|
-
const iconDefinitions = loadFolderIconDefinitions(
|
|
172
|
-
folderIcons,
|
|
173
|
-
iconConfig,
|
|
174
|
-
options
|
|
175
|
-
);
|
|
176
|
-
expectedConfig.iconDefinitions = {
|
|
177
|
-
folder: {
|
|
178
|
-
iconPath: './../icons/folder.svg',
|
|
179
|
-
},
|
|
180
|
-
'folder-open': {
|
|
181
|
-
iconPath: './../icons/folder-open.svg',
|
|
182
|
-
},
|
|
183
|
-
'folder-root': {
|
|
184
|
-
iconPath: './../icons/folder-root.svg',
|
|
185
|
-
},
|
|
186
|
-
'folder-root-open': {
|
|
187
|
-
iconPath: './../icons/folder-root-open.svg',
|
|
188
|
-
},
|
|
189
|
-
'folder-src': {
|
|
190
|
-
iconPath: './../icons/folder-src.svg',
|
|
191
|
-
},
|
|
192
|
-
'folder-src-open': {
|
|
193
|
-
iconPath: './../icons/folder-src-open.svg',
|
|
194
|
-
},
|
|
195
|
-
'folder-angular': {
|
|
196
|
-
iconPath: './../icons/folder-angular.svg',
|
|
197
|
-
},
|
|
198
|
-
'folder-angular-open': {
|
|
199
|
-
iconPath: './../icons/folder-angular-open.svg',
|
|
200
|
-
},
|
|
201
|
-
};
|
|
202
|
-
expectedConfig.folder = 'folder';
|
|
203
|
-
expectedConfig.folderExpanded = 'folder-open';
|
|
204
|
-
expectedConfig.rootFolder = 'folder-root';
|
|
205
|
-
expectedConfig.rootFolderExpanded = 'folder-root-open';
|
|
206
|
-
expectedConfig.folderNames = {
|
|
207
|
-
src: 'folder-src',
|
|
208
|
-
source: 'folder-src',
|
|
209
|
-
angular: 'folder-angular',
|
|
210
|
-
ng: 'folder-angular',
|
|
211
|
-
sample: 'folder-src',
|
|
212
|
-
};
|
|
213
|
-
expectedConfig.folderNamesExpanded = {
|
|
214
|
-
src: 'folder-src-open',
|
|
215
|
-
source: 'folder-src-open',
|
|
216
|
-
angular: 'folder-angular-open',
|
|
217
|
-
ng: 'folder-angular-open',
|
|
218
|
-
sample: 'folder-src-open',
|
|
219
|
-
};
|
|
220
|
-
expectedConfig.hidesExplorerArrows = false;
|
|
221
|
-
expectedConfig.options!.folders!.associations = {
|
|
222
|
-
sample: 'src',
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
it('should disable icon packs', () => {
|
|
229
|
-
const options = getDefaultIconOptions();
|
|
230
|
-
options.activeIconPack = '';
|
|
231
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
232
|
-
const iconDefinitions = loadFolderIconDefinitions(
|
|
233
|
-
folderIcons,
|
|
234
|
-
iconConfig,
|
|
235
|
-
options
|
|
236
|
-
);
|
|
237
|
-
expectedConfig.iconDefinitions = {
|
|
238
|
-
folder: {
|
|
239
|
-
iconPath: './../icons/folder.svg',
|
|
240
|
-
},
|
|
241
|
-
'folder-open': {
|
|
242
|
-
iconPath: './../icons/folder-open.svg',
|
|
243
|
-
},
|
|
244
|
-
'folder-root': {
|
|
245
|
-
iconPath: './../icons/folder-root.svg',
|
|
246
|
-
},
|
|
247
|
-
'folder-root-open': {
|
|
248
|
-
iconPath: './../icons/folder-root-open.svg',
|
|
249
|
-
},
|
|
250
|
-
'folder-src': {
|
|
251
|
-
iconPath: './../icons/folder-src.svg',
|
|
252
|
-
},
|
|
253
|
-
'folder-src-open': {
|
|
254
|
-
iconPath: './../icons/folder-src-open.svg',
|
|
255
|
-
},
|
|
256
|
-
};
|
|
257
|
-
expectedConfig.folder = 'folder';
|
|
258
|
-
expectedConfig.folderExpanded = 'folder-open';
|
|
259
|
-
expectedConfig.rootFolder = 'folder-root';
|
|
260
|
-
expectedConfig.rootFolderExpanded = 'folder-root-open';
|
|
261
|
-
expectedConfig.folderNames = {
|
|
262
|
-
src: 'folder-src',
|
|
263
|
-
source: 'folder-src',
|
|
264
|
-
};
|
|
265
|
-
expectedConfig.folderNamesExpanded = {
|
|
266
|
-
src: 'folder-src-open',
|
|
267
|
-
source: 'folder-src-open',
|
|
268
|
-
};
|
|
269
|
-
expectedConfig.hidesExplorerArrows = false;
|
|
270
|
-
|
|
271
|
-
// disable default icon pack by using empty string
|
|
272
|
-
expectedConfig.options!.activeIconPack = '';
|
|
273
|
-
|
|
274
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
it('should configure folder icons for light and high contrast', () => {
|
|
278
|
-
const options = getDefaultIconOptions();
|
|
279
|
-
const lightHighContrastFolderIcons: FolderTheme[] = [
|
|
280
|
-
{
|
|
281
|
-
name: 'specific',
|
|
282
|
-
defaultIcon: { name: 'folder', light: true, highContrast: true },
|
|
283
|
-
rootFolder: { name: 'folder-root', light: true, highContrast: true },
|
|
284
|
-
icons: [
|
|
285
|
-
{
|
|
286
|
-
name: 'folder-src',
|
|
287
|
-
folderNames: ['src', 'source'],
|
|
288
|
-
light: true,
|
|
289
|
-
highContrast: true,
|
|
290
|
-
},
|
|
291
|
-
],
|
|
292
|
-
},
|
|
293
|
-
];
|
|
294
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
295
|
-
const iconDefinitions = loadFolderIconDefinitions(
|
|
296
|
-
lightHighContrastFolderIcons,
|
|
297
|
-
iconConfig,
|
|
298
|
-
options
|
|
299
|
-
);
|
|
300
|
-
/* eslint-disable camelcase */
|
|
301
|
-
expectedConfig.iconDefinitions = {
|
|
302
|
-
folder: {
|
|
303
|
-
iconPath: './../icons/folder.svg',
|
|
304
|
-
},
|
|
305
|
-
'folder-open': {
|
|
306
|
-
iconPath: './../icons/folder-open.svg',
|
|
307
|
-
},
|
|
308
|
-
folder_light: {
|
|
309
|
-
iconPath: './../icons/folder_light.svg',
|
|
310
|
-
},
|
|
311
|
-
'folder-open_light': {
|
|
312
|
-
iconPath: './../icons/folder-open_light.svg',
|
|
313
|
-
},
|
|
314
|
-
folder_highContrast: {
|
|
315
|
-
iconPath: './../icons/folder_highContrast.svg',
|
|
316
|
-
},
|
|
317
|
-
'folder-open_highContrast': {
|
|
318
|
-
iconPath: './../icons/folder-open_highContrast.svg',
|
|
319
|
-
},
|
|
320
|
-
'folder-root': {
|
|
321
|
-
iconPath: './../icons/folder-root.svg',
|
|
322
|
-
},
|
|
323
|
-
'folder-root-open': {
|
|
324
|
-
iconPath: './../icons/folder-root-open.svg',
|
|
325
|
-
},
|
|
326
|
-
'folder-root_light': {
|
|
327
|
-
iconPath: './../icons/folder-root_light.svg',
|
|
328
|
-
},
|
|
329
|
-
'folder-root-open_light': {
|
|
330
|
-
iconPath: './../icons/folder-root-open_light.svg',
|
|
331
|
-
},
|
|
332
|
-
'folder-root_highContrast': {
|
|
333
|
-
iconPath: './../icons/folder-root_highContrast.svg',
|
|
334
|
-
},
|
|
335
|
-
'folder-root-open_highContrast': {
|
|
336
|
-
iconPath: './../icons/folder-root-open_highContrast.svg',
|
|
337
|
-
},
|
|
338
|
-
'folder-src': {
|
|
339
|
-
iconPath: './../icons/folder-src.svg',
|
|
340
|
-
},
|
|
341
|
-
'folder-src-open': {
|
|
342
|
-
iconPath: './../icons/folder-src-open.svg',
|
|
343
|
-
},
|
|
344
|
-
'folder-src_light': {
|
|
345
|
-
iconPath: './../icons/folder-src_light.svg',
|
|
346
|
-
},
|
|
347
|
-
'folder-src-open_light': {
|
|
348
|
-
iconPath: './../icons/folder-src-open_light.svg',
|
|
349
|
-
},
|
|
350
|
-
'folder-src_highContrast': {
|
|
351
|
-
iconPath: './../icons/folder-src_highContrast.svg',
|
|
352
|
-
},
|
|
353
|
-
'folder-src-open_highContrast': {
|
|
354
|
-
iconPath: './../icons/folder-src-open_highContrast.svg',
|
|
355
|
-
},
|
|
356
|
-
};
|
|
357
|
-
expectedConfig.folder = 'folder';
|
|
358
|
-
expectedConfig.folderExpanded = 'folder-open';
|
|
359
|
-
expectedConfig.rootFolder = 'folder-root';
|
|
360
|
-
expectedConfig.rootFolderExpanded = 'folder-root-open';
|
|
361
|
-
expectedConfig.folderNames = {
|
|
362
|
-
src: 'folder-src',
|
|
363
|
-
source: 'folder-src',
|
|
364
|
-
};
|
|
365
|
-
expectedConfig.folderNamesExpanded = {
|
|
366
|
-
src: 'folder-src-open',
|
|
367
|
-
source: 'folder-src-open',
|
|
368
|
-
};
|
|
369
|
-
expectedConfig.light = {
|
|
370
|
-
fileExtensions: {},
|
|
371
|
-
fileNames: {},
|
|
372
|
-
folder: 'folder_light',
|
|
373
|
-
folderExpanded: 'folder-open_light',
|
|
374
|
-
rootFolder: 'folder-root_light',
|
|
375
|
-
rootFolderExpanded: 'folder-root-open_light',
|
|
376
|
-
folderNames: {
|
|
377
|
-
src: 'folder-src_light',
|
|
378
|
-
source: 'folder-src_light',
|
|
379
|
-
},
|
|
380
|
-
folderNamesExpanded: {
|
|
381
|
-
src: 'folder-src-open_light',
|
|
382
|
-
source: 'folder-src-open_light',
|
|
383
|
-
},
|
|
384
|
-
};
|
|
385
|
-
expectedConfig.highContrast = {
|
|
386
|
-
fileExtensions: {},
|
|
387
|
-
fileNames: {},
|
|
388
|
-
folder: 'folder_highContrast',
|
|
389
|
-
folderExpanded: 'folder-open_highContrast',
|
|
390
|
-
rootFolder: 'folder-root_highContrast',
|
|
391
|
-
rootFolderExpanded: 'folder-root-open_highContrast',
|
|
392
|
-
folderNames: {
|
|
393
|
-
src: 'folder-src_highContrast',
|
|
394
|
-
source: 'folder-src_highContrast',
|
|
395
|
-
},
|
|
396
|
-
folderNamesExpanded: {
|
|
397
|
-
src: 'folder-src-open_highContrast',
|
|
398
|
-
source: 'folder-src-open_highContrast',
|
|
399
|
-
},
|
|
400
|
-
};
|
|
401
|
-
expectedConfig.hidesExplorerArrows = false;
|
|
402
|
-
/* eslint-enable camelcase */
|
|
403
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
it('should hide explorer arrows', () => {
|
|
407
|
-
const options = getDefaultIconOptions();
|
|
408
|
-
options.hidesExplorerArrows = true;
|
|
409
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
410
|
-
const iconDefinitions = loadFolderIconDefinitions(
|
|
411
|
-
folderIcons,
|
|
412
|
-
iconConfig,
|
|
413
|
-
options
|
|
414
|
-
);
|
|
415
|
-
|
|
416
|
-
deepStrictEqual(iconDefinitions.hidesExplorerArrows, true);
|
|
417
|
-
});
|
|
418
|
-
});
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { deepStrictEqual } from 'assert';
|
|
2
|
-
import merge from 'lodash.merge';
|
|
3
|
-
import {
|
|
4
|
-
getDefaultIconOptions,
|
|
5
|
-
loadLanguageIconDefinitions,
|
|
6
|
-
} from '../../../icons/index';
|
|
7
|
-
import {
|
|
8
|
-
IconConfiguration,
|
|
9
|
-
IconPack,
|
|
10
|
-
LanguageIcon,
|
|
11
|
-
} from '../../../models/index';
|
|
12
|
-
|
|
13
|
-
describe('language icons', () => {
|
|
14
|
-
let expectedConfig: IconConfiguration;
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
expectedConfig = merge({}, new IconConfiguration(), {
|
|
18
|
-
options: getDefaultIconOptions(),
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should configure icon definitions', () => {
|
|
23
|
-
const languageIcons: LanguageIcon[] = [
|
|
24
|
-
{ icon: { name: 'a' }, ids: ['a'] },
|
|
25
|
-
{ icon: { name: 'b' }, ids: ['b'] },
|
|
26
|
-
{ icon: { name: 'c' }, ids: ['c', 'd'] },
|
|
27
|
-
];
|
|
28
|
-
const options = getDefaultIconOptions();
|
|
29
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
30
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
31
|
-
languageIcons,
|
|
32
|
-
iconConfig,
|
|
33
|
-
options
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
expectedConfig.iconDefinitions = {
|
|
37
|
-
a: {
|
|
38
|
-
iconPath: './../icons/a.svg',
|
|
39
|
-
},
|
|
40
|
-
b: {
|
|
41
|
-
iconPath: './../icons/b.svg',
|
|
42
|
-
},
|
|
43
|
-
c: {
|
|
44
|
-
iconPath: './../icons/c.svg',
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
expectedConfig.languageIds = {
|
|
48
|
-
a: 'a',
|
|
49
|
-
b: 'b',
|
|
50
|
-
c: 'c',
|
|
51
|
-
d: 'c',
|
|
52
|
-
};
|
|
53
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('should disable icon definitions', () => {
|
|
57
|
-
const languageIcons: LanguageIcon[] = [
|
|
58
|
-
{ icon: { name: 'a' }, ids: ['a'] },
|
|
59
|
-
{ icon: { name: 'c' }, ids: ['c', 'd'], disabled: true },
|
|
60
|
-
];
|
|
61
|
-
const options = getDefaultIconOptions();
|
|
62
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
63
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
64
|
-
languageIcons,
|
|
65
|
-
iconConfig,
|
|
66
|
-
options
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
expectedConfig.iconDefinitions = {
|
|
70
|
-
a: {
|
|
71
|
-
iconPath: './../icons/a.svg',
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
expectedConfig.languageIds = {
|
|
75
|
-
a: 'a',
|
|
76
|
-
};
|
|
77
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it('should disable icon packs', () => {
|
|
81
|
-
const languageIcons: LanguageIcon[] = [
|
|
82
|
-
{ icon: { name: 'a' }, ids: ['a'], enabledFor: [IconPack.Angular] },
|
|
83
|
-
{ icon: { name: 'c' }, ids: ['c', 'd'], disabled: true },
|
|
84
|
-
];
|
|
85
|
-
const options = getDefaultIconOptions();
|
|
86
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
87
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
88
|
-
languageIcons,
|
|
89
|
-
iconConfig,
|
|
90
|
-
{ ...options, activeIconPack: '' }
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
expectedConfig.iconDefinitions = {};
|
|
94
|
-
expectedConfig.languageIds = {};
|
|
95
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('should configure language icons for light and high contrast', () => {
|
|
99
|
-
const languageIcons: LanguageIcon[] = [
|
|
100
|
-
{ icon: { name: 'a', light: true, highContrast: true }, ids: ['a'] },
|
|
101
|
-
{ icon: { name: 'b', light: true, highContrast: true }, ids: ['b'] },
|
|
102
|
-
];
|
|
103
|
-
const options = getDefaultIconOptions();
|
|
104
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
105
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
106
|
-
languageIcons,
|
|
107
|
-
iconConfig,
|
|
108
|
-
options
|
|
109
|
-
);
|
|
110
|
-
/* eslint-disable camelcase */
|
|
111
|
-
expectedConfig.iconDefinitions = {
|
|
112
|
-
a: {
|
|
113
|
-
iconPath: './../icons/a.svg',
|
|
114
|
-
},
|
|
115
|
-
a_light: {
|
|
116
|
-
iconPath: './../icons/a_light.svg',
|
|
117
|
-
},
|
|
118
|
-
a_highContrast: {
|
|
119
|
-
iconPath: './../icons/a_highContrast.svg',
|
|
120
|
-
},
|
|
121
|
-
b: {
|
|
122
|
-
iconPath: './../icons/b.svg',
|
|
123
|
-
},
|
|
124
|
-
b_light: {
|
|
125
|
-
iconPath: './../icons/b_light.svg',
|
|
126
|
-
},
|
|
127
|
-
b_highContrast: {
|
|
128
|
-
iconPath: './../icons/b_highContrast.svg',
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
expectedConfig.languageIds = {
|
|
132
|
-
a: 'a',
|
|
133
|
-
b: 'b',
|
|
134
|
-
};
|
|
135
|
-
expectedConfig.light = {
|
|
136
|
-
fileExtensions: {},
|
|
137
|
-
fileNames: {},
|
|
138
|
-
languageIds: {
|
|
139
|
-
a: 'a_light',
|
|
140
|
-
b: 'b_light',
|
|
141
|
-
},
|
|
142
|
-
};
|
|
143
|
-
expectedConfig.highContrast = {
|
|
144
|
-
fileExtensions: {},
|
|
145
|
-
fileNames: {},
|
|
146
|
-
languageIds: {
|
|
147
|
-
a: 'a_highContrast',
|
|
148
|
-
b: 'b_highContrast',
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
/* eslint-enable camelcase */
|
|
152
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it('should configure custom icon associations', () => {
|
|
156
|
-
const languageIcons: LanguageIcon[] = [
|
|
157
|
-
{ icon: { name: 'json' }, ids: ['a'] },
|
|
158
|
-
];
|
|
159
|
-
const options = getDefaultIconOptions();
|
|
160
|
-
options.languages.associations = {
|
|
161
|
-
xml: 'json',
|
|
162
|
-
};
|
|
163
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
164
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
165
|
-
languageIcons,
|
|
166
|
-
iconConfig,
|
|
167
|
-
options
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
expectedConfig.iconDefinitions = {
|
|
171
|
-
json: {
|
|
172
|
-
iconPath: './../icons/json.svg',
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
expectedConfig.languageIds = {
|
|
176
|
-
a: 'json',
|
|
177
|
-
xml: 'json',
|
|
178
|
-
};
|
|
179
|
-
expectedConfig.options!.languages!.associations = {
|
|
180
|
-
xml: 'json',
|
|
181
|
-
};
|
|
182
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
183
|
-
});
|
|
184
|
-
});
|
package/src/test/spec/index.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import glob from 'glob';
|
|
2
|
-
import Mocha from 'mocha';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
export const run = (): Promise<void> => {
|
|
6
|
-
// Create the mocha test
|
|
7
|
-
const mocha = new Mocha({
|
|
8
|
-
ui: 'bdd',
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const testsRoot = path.resolve(__dirname, '..');
|
|
12
|
-
|
|
13
|
-
return new Promise((c, e) => {
|
|
14
|
-
glob('**/*.spec.js', { cwd: testsRoot }, (err, files) => {
|
|
15
|
-
if (err) {
|
|
16
|
-
return e(err);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Add files to the test suite
|
|
20
|
-
files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f)));
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
// Run the mocha test
|
|
24
|
-
mocha.run((failures) => {
|
|
25
|
-
if (failures > 0) {
|
|
26
|
-
e(new Error(`${failures} tests failed.`));
|
|
27
|
-
} else {
|
|
28
|
-
c();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
} catch (err) {
|
|
32
|
-
e(err);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
};
|
package/src/web/extension.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This method is called when the extension is activated.
|
|
5
|
-
* It initializes the core functionality of the extension.
|
|
6
|
-
*/
|
|
7
|
-
export const activate = async () => {};
|
|
8
|
-
|
|
9
|
-
/** This method is called when the extension is deactivated */
|
|
10
|
-
export const deactivate = () => {};
|
package/svgo.config.js
DELETED
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"target": "es6",
|
|
5
|
-
"outDir": "out",
|
|
6
|
-
"lib": ["es6", "dom"],
|
|
7
|
-
"strict": true,
|
|
8
|
-
"strictNullChecks": true,
|
|
9
|
-
"strictPropertyInitialization": true,
|
|
10
|
-
"noImplicitAny": true,
|
|
11
|
-
"sourceMap": true,
|
|
12
|
-
"rootDir": "src",
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"allowSyntheticDefaultImports": true,
|
|
16
|
-
"esModuleInterop": true
|
|
17
|
-
},
|
|
18
|
-
"include": [
|
|
19
|
-
"src/**/*.ts",
|
|
20
|
-
"./node_modules/vscode/vscode.d.ts",
|
|
21
|
-
"./node_modules/vscode/lib/*"
|
|
22
|
-
]
|
|
23
|
-
}
|