material-icon-theme 4.21.0 → 4.22.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.
Files changed (362) hide show
  1. package/.vscodeignore +2 -1
  2. package/CHANGELOG.md +1267 -1233
  3. package/README.md +7 -16
  4. package/icons/actionscript.svg +1 -1
  5. package/icons/android.svg +1 -1
  6. package/icons/antlr.svg +1 -0
  7. package/icons/architecture.svg +1 -5
  8. package/icons/asciidoc.svg +1 -1
  9. package/icons/assembly.svg +1 -1
  10. package/icons/astyle.svg +1 -4
  11. package/icons/aurelia.svg +1 -1
  12. package/icons/auto.svg +1 -10
  13. package/icons/auto_light.svg +1 -10
  14. package/icons/autohotkey.svg +1 -1
  15. package/icons/autoit.svg +1 -1
  16. package/icons/azure-pipelines.svg +1 -1
  17. package/icons/azure.svg +1 -10
  18. package/icons/ballerina.svg +1 -1
  19. package/icons/bazel.svg +1 -1
  20. package/icons/bitbucket.svg +1 -1
  21. package/icons/blink.svg +1 -1
  22. package/icons/blink_light.svg +1 -1
  23. package/icons/blitz.svg +1 -4
  24. package/icons/brainfuck.svg +1 -1
  25. package/icons/buck.svg +1 -1
  26. package/icons/bucklescript.svg +1 -1
  27. package/icons/buildkite.svg +1 -9
  28. package/icons/caddy.svg +1 -9
  29. package/icons/cadence.svg +1 -10
  30. package/icons/cloudfoundry.svg +1 -1
  31. package/icons/coala.svg +1 -1
  32. package/icons/codecov.svg +1 -1
  33. package/icons/coldfusion.svg +1 -1
  34. package/icons/commitlint.svg +1 -1
  35. package/icons/crystal.svg +1 -1
  36. package/icons/crystal_light.svg +1 -1
  37. package/icons/cucumber.svg +1 -1
  38. package/icons/cuda.svg +1 -1
  39. package/icons/cypress.svg +1 -4
  40. package/icons/dart_generated.svg +1 -9
  41. package/icons/dependabot.svg +1 -4
  42. package/icons/dinophp.svg +1 -16
  43. package/icons/docker.svg +1 -1
  44. package/icons/drawio.svg +1 -1
  45. package/icons/drone.svg +1 -6
  46. package/icons/drone_light.svg +1 -6
  47. package/icons/editorconfig.svg +1 -1
  48. package/icons/elm.svg +1 -1
  49. package/icons/figma.svg +1 -10
  50. package/icons/folder-angular-open.svg +1 -2
  51. package/icons/folder-angular.svg +1 -2
  52. package/icons/folder-ansible-open.svg +1 -1
  53. package/icons/folder-ansible.svg +1 -1
  54. package/icons/folder-apollo.svg +1 -1
  55. package/icons/folder-aurelia-open.svg +1 -1
  56. package/icons/folder-aurelia.svg +1 -1
  57. package/icons/folder-bower-open.svg +1 -1
  58. package/icons/folder-bower.svg +1 -1
  59. package/icons/folder-buildkite-open.svg +1 -9
  60. package/icons/folder-buildkite.svg +1 -8
  61. package/icons/folder-cart-open.svg +1 -1
  62. package/icons/folder-cart.svg +1 -1
  63. package/icons/folder-ci-open.svg +1 -1
  64. package/icons/folder-ci.svg +1 -1
  65. package/icons/folder-cobol-open.svg +1 -1
  66. package/icons/folder-cobol.svg +1 -1
  67. package/icons/folder-config-open.svg +1 -1
  68. package/icons/folder-config.svg +1 -1
  69. package/icons/folder-container-open.svg +1 -1
  70. package/icons/folder-container.svg +1 -1
  71. package/icons/folder-controller-open.svg +1 -1
  72. package/icons/folder-controller.svg +1 -1
  73. package/icons/folder-cypress-open.svg +1 -5
  74. package/icons/folder-cypress.svg +1 -5
  75. package/icons/folder-decorators-open.svg +2 -0
  76. package/icons/folder-decorators.svg +5 -0
  77. package/icons/folder-docker-open.svg +1 -1
  78. package/icons/folder-docker.svg +1 -1
  79. package/icons/folder-expo.svg +1 -1
  80. package/icons/folder-fastlane-open.svg +1 -1
  81. package/icons/folder-fastlane.svg +1 -1
  82. package/icons/folder-generator-open.svg +1 -1
  83. package/icons/folder-generator.svg +1 -1
  84. package/icons/folder-gitlab-open.svg +1 -2
  85. package/icons/folder-gitlab.svg +1 -2
  86. package/icons/folder-gradle-open.svg +1 -1
  87. package/icons/folder-gradle.svg +1 -1
  88. package/icons/folder-helper-open.svg +1 -1
  89. package/icons/folder-helper.svg +1 -1
  90. package/icons/folder-ios-open.svg +1 -1
  91. package/icons/folder-ios.svg +1 -1
  92. package/icons/folder-java-open.svg +1 -2
  93. package/icons/folder-java.svg +1 -2
  94. package/icons/folder-kubernetes-open.svg +1 -1
  95. package/icons/folder-kubernetes.svg +1 -1
  96. package/icons/folder-less-open.svg +1 -1
  97. package/icons/folder-less.svg +1 -1
  98. package/icons/folder-lib-open.svg +1 -1
  99. package/icons/folder-lib.svg +1 -1
  100. package/icons/folder-lua-open.svg +1 -1
  101. package/icons/folder-lua.svg +1 -1
  102. package/icons/folder-markdown-open.svg +1 -1
  103. package/icons/folder-markdown.svg +1 -1
  104. package/icons/folder-mjml.svg +1 -1
  105. package/icons/folder-netlify-open.svg +1 -5
  106. package/icons/folder-netlify.svg +1 -2
  107. package/icons/folder-next-open.svg +1 -2
  108. package/icons/folder-next.svg +1 -2
  109. package/icons/folder-nuxt-open.svg +1 -2
  110. package/icons/folder-nuxt.svg +1 -2
  111. package/icons/folder-pdf-open.svg +1 -2
  112. package/icons/folder-pdf.svg +1 -2
  113. package/icons/folder-php-open.svg +1 -1
  114. package/icons/folder-php.svg +1 -1
  115. package/icons/folder-pipe.svg +1 -1
  116. package/icons/folder-proto-open.svg +1 -2
  117. package/icons/folder-proto.svg +1 -2
  118. package/icons/folder-public-open.svg +1 -1
  119. package/icons/folder-python-open.svg +1 -1
  120. package/icons/folder-python.svg +1 -1
  121. package/icons/folder-queue-open.svg +1 -2
  122. package/icons/folder-queue.svg +1 -2
  123. package/icons/folder-react-components-open.svg +1 -1
  124. package/icons/folder-react-components.svg +1 -1
  125. package/icons/folder-redux-actions-open.svg +1 -1
  126. package/icons/folder-redux-actions.svg +1 -1
  127. package/icons/folder-redux-reducer-open.svg +1 -1
  128. package/icons/folder-redux-reducer.svg +1 -1
  129. package/icons/folder-redux-selector-open.svg +1 -1
  130. package/icons/folder-redux-selector.svg +1 -1
  131. package/icons/folder-redux-store-open.svg +1 -1
  132. package/icons/folder-redux-store.svg +1 -1
  133. package/icons/folder-resolver-open.svg +1 -2
  134. package/icons/folder-resolver.svg +1 -2
  135. package/icons/folder-resource-open.svg +1 -1
  136. package/icons/folder-resource.svg +1 -1
  137. package/icons/folder-sass-open.svg +1 -1
  138. package/icons/folder-sass.svg +1 -1
  139. package/icons/folder-scala-open.svg +1 -1
  140. package/icons/folder-scala.svg +1 -1
  141. package/icons/folder-server-open.svg +1 -1
  142. package/icons/folder-server.svg +1 -1
  143. package/icons/folder-serverless-open.svg +1 -5
  144. package/icons/folder-serverless.svg +1 -5
  145. package/icons/folder-shader-open.svg +1 -8
  146. package/icons/folder-shader.svg +1 -7
  147. package/icons/folder-src-open.svg +1 -1
  148. package/icons/folder-src.svg +1 -1
  149. package/icons/folder-stencil-open.svg +1 -1
  150. package/icons/folder-stencil.svg +1 -1
  151. package/icons/folder-supabase-open.svg +5 -0
  152. package/icons/folder-supabase.svg +2 -0
  153. package/icons/folder-svelte-open.svg +1 -1
  154. package/icons/folder-target-open.svg +1 -2
  155. package/icons/folder-target.svg +1 -2
  156. package/icons/folder-terraform-open.svg +1 -1
  157. package/icons/folder-terraform.svg +1 -1
  158. package/icons/folder-typescript-open.svg +1 -1
  159. package/icons/folder-typescript.svg +1 -1
  160. package/icons/folder-unity-open.svg +1 -2
  161. package/icons/folder-unity.svg +1 -2
  162. package/icons/folder-vercel-open.svg +1 -4
  163. package/icons/folder-vercel.svg +1 -4
  164. package/icons/folder-verdaccio-open.svg +1 -8
  165. package/icons/folder-verdaccio.svg +1 -8
  166. package/icons/folder-vue-directives-open.svg +1 -1
  167. package/icons/folder-vue-directives.svg +1 -1
  168. package/icons/folder-vue-open.svg +1 -1
  169. package/icons/folder-vue.svg +1 -1
  170. package/icons/folder-vuepress-open.svg +1 -1
  171. package/icons/folder-wakatime-open.svg +1 -1
  172. package/icons/folder-wakatime.svg +1 -1
  173. package/icons/folder-wordpress-open.svg +1 -1
  174. package/icons/folder-wordpress.svg +1 -1
  175. package/icons/forth.svg +1 -1
  176. package/icons/foxpro.svg +1 -1
  177. package/icons/fusebox.svg +1 -1
  178. package/icons/gatsby.svg +1 -1
  179. package/icons/gcp.svg +1 -1
  180. package/icons/gitlab.svg +1 -1
  181. package/icons/gleam.svg +1 -4
  182. package/icons/go-mod.svg +1 -1
  183. package/icons/go.svg +1 -1
  184. package/icons/graphcool.svg +1 -1
  185. package/icons/graphql.svg +1 -1
  186. package/icons/gridsome.svg +1 -4
  187. package/icons/grunt.svg +1 -1
  188. package/icons/hack.svg +1 -1
  189. package/icons/haml.svg +1 -1
  190. package/icons/hardhat.svg +1 -4
  191. package/icons/helm.svg +1 -1
  192. package/icons/heroku.svg +1 -1
  193. package/icons/hex.svg +1 -1
  194. package/icons/idris.svg +1 -1
  195. package/icons/jenkins.svg +1 -1
  196. package/icons/jest.svg +1 -1
  197. package/icons/jinja.svg +1 -1
  198. package/icons/jinja_light.svg +1 -1
  199. package/icons/kivy.svg +1 -1
  200. package/icons/kl.svg +1 -1
  201. package/icons/kusto.svg +1 -1
  202. package/icons/laravel.svg +1 -1
  203. package/icons/less.svg +1 -1
  204. package/icons/lighthouse.svg +1 -3
  205. package/icons/livescript.svg +1 -1
  206. package/icons/mdsvex.svg +1 -5
  207. package/icons/merlin.svg +1 -1
  208. package/icons/mjml.svg +1 -1
  209. package/icons/mocha.svg +1 -1
  210. package/icons/modernizr.svg +1 -1
  211. package/icons/nano-staged.svg +1 -0
  212. package/icons/nano-staged_light.svg +1 -0
  213. package/icons/ndst.svg +1 -7
  214. package/icons/netlify.svg +1 -1
  215. package/icons/next.svg +1 -3
  216. package/icons/next_light.svg +1 -3
  217. package/icons/npm.svg +1 -1
  218. package/icons/nrwl.svg +1 -1
  219. package/icons/nunjucks.svg +1 -1
  220. package/icons/nuxt.svg +1 -5
  221. package/icons/odin.svg +1 -6
  222. package/icons/otne.svg +1 -16
  223. package/icons/parcel.svg +1 -4
  224. package/icons/pdf.svg +1 -4
  225. package/icons/percy.svg +1 -1
  226. package/icons/pinejs.svg +1 -0
  227. package/icons/playwright.svg +1 -7
  228. package/icons/plop.svg +1 -4
  229. package/icons/pnpm.svg +1 -9
  230. package/icons/pnpm_light.svg +1 -7
  231. package/icons/poetry.svg +1 -1
  232. package/icons/postcss.svg +1 -1
  233. package/icons/posthtml.svg +1 -1
  234. package/icons/processing.svg +1 -10
  235. package/icons/prolog.svg +1 -1
  236. package/icons/protractor.svg +1 -1
  237. package/icons/pug.svg +1 -1
  238. package/icons/puppet.svg +1 -1
  239. package/icons/purescript.svg +1 -1
  240. package/icons/python.svg +1 -1
  241. package/icons/racket.svg +1 -1
  242. package/icons/red.svg +1 -1
  243. package/icons/remix.svg +1 -4
  244. package/icons/remix_light.svg +1 -4
  245. package/icons/replit.svg +1 -1
  246. package/icons/rescript-interface.svg +1 -5
  247. package/icons/restql.svg +1 -1
  248. package/icons/roadmap.svg +1 -1
  249. package/icons/robot.svg +1 -1
  250. package/icons/rollup.svg +1 -1
  251. package/icons/rome.svg +1 -5
  252. package/icons/rubocop.svg +1 -1
  253. package/icons/rubocop_light.svg +1 -1
  254. package/icons/ruby.svg +1 -1
  255. package/icons/san.svg +1 -1
  256. package/icons/sass.svg +1 -1
  257. package/icons/scala.svg +1 -1
  258. package/icons/sequelize.svg +1 -1
  259. package/icons/serverless.svg +1 -4
  260. package/icons/shader.svg +1 -4
  261. package/icons/silverstripe.svg +1 -1
  262. package/icons/siyuan.svg +1 -9
  263. package/icons/sketch.svg +1 -1
  264. package/icons/snyk.svg +1 -1
  265. package/icons/sonarcloud.svg +4 -0
  266. package/icons/steadybit.svg +1 -1
  267. package/icons/stencil.svg +1 -1
  268. package/icons/stitches.svg +1 -1
  269. package/icons/stitches_light.svg +1 -1
  270. package/icons/stylable.svg +10 -0
  271. package/icons/supabase.svg +4 -0
  272. package/icons/svgr.svg +1 -4
  273. package/icons/tauri.svg +1 -9
  274. package/icons/template.svg +1 -4
  275. package/icons/tobi.svg +1 -4
  276. package/icons/tobimake.svg +1 -14
  277. package/icons/tree.svg +1 -2
  278. package/icons/tsconfig.svg +1 -1
  279. package/icons/turborepo.svg +1 -12
  280. package/icons/turborepo_light.svg +1 -12
  281. package/icons/twine.svg +1 -1
  282. package/icons/vagrant.svg +1 -1
  283. package/icons/verdaccio.svg +1 -5
  284. package/icons/vscode.svg +1 -1
  285. package/icons/vue-config.svg +1 -1
  286. package/icons/vue.svg +1 -1
  287. package/icons/webhint.svg +1 -1
  288. package/icons/zig.svg +1 -1
  289. package/images/contributors.png +0 -0
  290. package/images/fileIcons.png +0 -0
  291. package/images/folderIcons.png +0 -0
  292. package/package.json +252 -267
  293. package/package.nls.de.json +0 -3
  294. package/package.nls.es.json +0 -3
  295. package/package.nls.fr.json +0 -3
  296. package/package.nls.ja.json +0 -3
  297. package/package.nls.json +0 -3
  298. package/package.nls.nl.json +0 -3
  299. package/package.nls.pl.json +0 -3
  300. package/package.nls.pt-BR.json +0 -3
  301. package/package.nls.pt-PT.json +0 -3
  302. package/package.nls.ru.json +0 -3
  303. package/package.nls.zh-CN.json +0 -3
  304. package/package.nls.zh-TW.json +0 -3
  305. package/src/commands/activate.ts +11 -9
  306. package/src/commands/explorerArrows.ts +18 -18
  307. package/src/commands/folderColor.ts +12 -12
  308. package/src/commands/folders.ts +17 -17
  309. package/src/commands/grayscale.ts +17 -17
  310. package/src/commands/iconPacks.ts +12 -16
  311. package/src/commands/index.ts +5 -5
  312. package/src/commands/opacity.ts +8 -8
  313. package/src/commands/saturation.ts +8 -8
  314. package/src/extension.ts +8 -13
  315. package/src/helpers/customIcons.ts +2 -2
  316. package/src/helpers/index.ts +10 -22
  317. package/src/i18n/index.ts +2 -2
  318. package/src/i18n/lang-de.ts +0 -11
  319. package/src/i18n/lang-en.ts +5 -15
  320. package/src/i18n/lang-es.ts +0 -10
  321. package/src/i18n/lang-fr.ts +0 -10
  322. package/src/i18n/lang-ja.ts +0 -11
  323. package/src/i18n/lang-nl.ts +0 -11
  324. package/src/i18n/lang-pl.ts +0 -9
  325. package/src/i18n/lang-pt-br.ts +0 -10
  326. package/src/i18n/lang-pt-pt.ts +0 -10
  327. package/src/i18n/lang-ru.ts +0 -9
  328. package/src/i18n/lang-uk.ts +0 -11
  329. package/src/i18n/lang-zh-cn.ts +0 -9
  330. package/src/i18n/lang-zh-tw.ts +0 -9
  331. package/src/icons/fileIcons.ts +2159 -2113
  332. package/src/icons/folderIcons.ts +804 -790
  333. package/src/icons/generator/folderGenerator.ts +7 -7
  334. package/src/icons/generator/iconOpacity.ts +10 -10
  335. package/src/icons/generator/iconSaturation.ts +10 -10
  336. package/src/icons/generator/jsonGenerator.ts +21 -17
  337. package/src/icons/languageIcons.ts +1 -0
  338. package/src/models/i18n/translation.ts +0 -9
  339. package/src/models/iconConfiguration.ts +1 -1
  340. package/src/models/icons/iconJsonOptions.ts +0 -2
  341. package/src/models/index.ts +0 -1
  342. package/src/scripts/contributors/index.ts +14 -14
  343. package/src/scripts/helpers/screenshots.ts +4 -4
  344. package/src/scripts/icons/checks/checkIconAvailability.ts +12 -12
  345. package/src/scripts/icons/checks/checkIconConflicts.ts +6 -8
  346. package/src/scripts/icons/checks/checkIconUsage.ts +9 -13
  347. package/src/scripts/icons/checks/index.ts +6 -6
  348. package/src/scripts/preview/preview.ts +8 -10
  349. package/src/test/runTest.ts +3 -3
  350. package/src/test/spec/i18n/i18n.spec.ts +13 -20
  351. package/src/test/spec/icons/fileIcons.spec.ts +5 -5
  352. package/src/test/spec/icons/folderIcons.spec.ts +8 -8
  353. package/src/test/spec/icons/languageIcons.spec.ts +6 -6
  354. package/images/oneclickactivation.png +0 -0
  355. package/src/helpers/versioning.ts +0 -73
  356. package/src/messages/outdated.ts +0 -33
  357. package/src/messages/reload.ts +0 -32
  358. package/src/messages/start.ts +0 -12
  359. package/src/messages/update.ts +0 -48
  360. package/src/messages/welcome.ts +0 -47
  361. package/src/models/helpers/index.ts +0 -1
  362. package/src/models/helpers/themeStatus.ts +0 -5
@@ -1,6 +1,6 @@
1
- import * as fs from 'fs';
1
+ import { writeFileSync } from 'fs';
2
2
  import merge from 'lodash.merge';
3
- import * as path from 'path';
3
+ import { basename, join } from 'path';
4
4
  import { getFileConfigHash } from '../../helpers/fileConfig';
5
5
  import {
6
6
  DefaultIcon,
@@ -316,15 +316,15 @@ const getSVG = (path: string) =>
316
316
 
317
317
  const writeSVGFiles = (iconName: string, svg: string) => {
318
318
  let iconsPath;
319
- if (path.basename(__dirname) === 'dist') {
320
- iconsPath = path.join(__dirname, '..', 'icons');
319
+ if (basename(__dirname) === 'dist') {
320
+ iconsPath = join(__dirname, '..', 'icons');
321
321
  } else {
322
322
  // executed via script
323
- iconsPath = path.join(__dirname, '..', '..', '..', 'icons');
323
+ iconsPath = join(__dirname, '..', '..', '..', 'icons');
324
324
  }
325
- const iconsFolderPath = path.join(iconsPath, `${iconName}.svg`);
325
+ const iconsFolderPath = join(iconsPath, `${iconName}.svg`);
326
326
  try {
327
- fs.writeFileSync(iconsFolderPath, svg);
327
+ writeFileSync(iconsFolderPath, svg);
328
328
  } catch (error) {
329
329
  console.error(error);
330
330
  }
@@ -1,5 +1,5 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
1
+ import { readdirSync, readFileSync, writeFileSync } from 'fs';
2
+ import { basename, join } from 'path';
3
3
  import { getCustomIconPaths } from '../../helpers/customIcons';
4
4
  import { IconJsonOptions } from '../../models';
5
5
 
@@ -19,22 +19,22 @@ export const setIconOpacity = (
19
19
  }
20
20
 
21
21
  let iconsPath = '';
22
- if (path.basename(__dirname) === 'dist') {
23
- iconsPath = path.join(__dirname, '..', 'icons');
22
+ if (basename(__dirname) === 'dist') {
23
+ iconsPath = join(__dirname, '..', 'icons');
24
24
  } else {
25
25
  // executed via script
26
- iconsPath = path.join(__dirname, '..', '..', '..', 'icons');
26
+ iconsPath = join(__dirname, '..', '..', '..', 'icons');
27
27
  }
28
28
 
29
29
  const customIconPaths = getCustomIconPaths(options);
30
- const iconFiles = fs.readdirSync(iconsPath);
30
+ const iconFiles = readdirSync(iconsPath);
31
31
 
32
32
  try {
33
33
  // read all icon files from the icons folder
34
34
  (fileNames || iconFiles).forEach(adjustOpacity(iconsPath, options));
35
35
 
36
36
  customIconPaths.forEach((iconPath) => {
37
- const customIcons = fs.readdirSync(iconPath);
37
+ const customIcons = readdirSync(iconPath);
38
38
  customIcons.forEach(adjustOpacity(iconPath, options));
39
39
  });
40
40
  } catch (error) {
@@ -88,10 +88,10 @@ const adjustOpacity = (
88
88
  options: IconJsonOptions
89
89
  ): ((value: string, index: number, array: string[]) => void) => {
90
90
  return (iconFileName) => {
91
- const svgFilePath = path.join(iconPath, iconFileName);
91
+ const svgFilePath = join(iconPath, iconFileName);
92
92
 
93
93
  // Read SVG file
94
- const svg = fs.readFileSync(svgFilePath, 'utf-8');
94
+ const svg = readFileSync(svgFilePath, 'utf-8');
95
95
 
96
96
  // Get the root element of the SVG file
97
97
  const svgRootElement = getSVGRootElement(svg);
@@ -106,6 +106,6 @@ const adjustOpacity = (
106
106
  }
107
107
  const updatedSVG = svg.replace(/<svg[^>]*>/, updatedRootElement);
108
108
 
109
- fs.writeFileSync(svgFilePath, updatedSVG);
109
+ writeFileSync(svgFilePath, updatedSVG);
110
110
  };
111
111
  };
@@ -1,5 +1,5 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
1
+ import { readdirSync, readFileSync, writeFileSync } from 'fs';
2
+ import { basename, join } from 'path';
3
3
  import { getCustomIconPaths } from '../../helpers/customIcons';
4
4
  import { IconJsonOptions } from '../../models';
5
5
 
@@ -19,22 +19,22 @@ export const setIconSaturation = (
19
19
  }
20
20
 
21
21
  let iconsPath = '';
22
- if (path.basename(__dirname) === 'dist') {
23
- iconsPath = path.join(__dirname, '..', 'icons');
22
+ if (basename(__dirname) === 'dist') {
23
+ iconsPath = join(__dirname, '..', 'icons');
24
24
  } else {
25
25
  // executed via script
26
- iconsPath = path.join(__dirname, '..', '..', '..', 'icons');
26
+ iconsPath = join(__dirname, '..', '..', '..', 'icons');
27
27
  }
28
28
 
29
29
  const customIconPaths = getCustomIconPaths(options);
30
- const iconFiles = fs.readdirSync(iconsPath);
30
+ const iconFiles = readdirSync(iconsPath);
31
31
 
32
32
  // read all icon files from the icons folder
33
33
  try {
34
34
  (fileNames || iconFiles).forEach(adjustSaturation(iconsPath, options));
35
35
 
36
36
  customIconPaths.forEach((iconPath) => {
37
- const customIcons = fs.readdirSync(iconPath);
37
+ const customIcons = readdirSync(iconPath);
38
38
  customIcons.forEach(adjustSaturation(iconPath, options));
39
39
  });
40
40
  } catch (error) {
@@ -110,10 +110,10 @@ const adjustSaturation = (
110
110
  options: IconJsonOptions
111
111
  ): ((value: string, index: number, array: string[]) => void) => {
112
112
  return (iconFileName) => {
113
- const svgFilePath = path.join(iconsPath, iconFileName);
113
+ const svgFilePath = join(iconsPath, iconFileName);
114
114
 
115
115
  // Read SVG file
116
- const svg = fs.readFileSync(svgFilePath, 'utf-8');
116
+ const svg = readFileSync(svgFilePath, 'utf-8');
117
117
 
118
118
  // Get the root element of the SVG file
119
119
  const svgRootElement = getSVGRootElement(svg);
@@ -135,6 +135,6 @@ const adjustSaturation = (
135
135
  updatedSVG = removeFilterElement(updatedSVG);
136
136
  }
137
137
 
138
- fs.writeFileSync(svgFilePath, updatedSVG);
138
+ writeFileSync(svgFilePath, updatedSVG);
139
139
  };
140
140
  };
@@ -1,6 +1,12 @@
1
- import * as fs from 'fs';
1
+ import {
2
+ existsSync,
3
+ readdirSync,
4
+ renameSync,
5
+ unlinkSync,
6
+ writeFileSync,
7
+ } from 'fs';
2
8
  import merge from 'lodash.merge';
3
- import * as path from 'path';
9
+ import { basename, join } from 'path';
4
10
  import { getCustomIconPaths } from '../../helpers/customIcons';
5
11
  import { getFileConfigHash } from '../../helpers/fileConfig';
6
12
  import { IconConfiguration, IconJsonOptions } from '../../models/index';
@@ -91,8 +97,8 @@ export const createIconFile = (
91
97
  try {
92
98
  let iconJsonPath = __dirname;
93
99
  // if executed via script
94
- if (path.basename(__dirname) !== 'dist') {
95
- iconJsonPath = path.join(__dirname, '..', '..', '..', 'dist');
100
+ if (basename(__dirname) !== 'dist') {
101
+ iconJsonPath = join(__dirname, '..', '..', '..', 'dist');
96
102
  }
97
103
  if (!updatedConfigs || (updatedConfigs.folders || {}).color) {
98
104
  // if updatedConfigs do not exist (because of initial setup)
@@ -119,11 +125,11 @@ export const createIconFile = (
119
125
  try {
120
126
  let iconJsonPath = __dirname;
121
127
  // if executed via script
122
- if (path.basename(__dirname) !== 'dist') {
123
- iconJsonPath = path.join(__dirname, '..', '..', '..', 'dist');
128
+ if (basename(__dirname) !== 'dist') {
129
+ iconJsonPath = join(__dirname, '..', '..', '..', 'dist');
124
130
  }
125
- fs.writeFileSync(
126
- path.join(iconJsonPath, iconJsonName),
131
+ writeFileSync(
132
+ join(iconJsonPath, iconJsonName),
127
133
  JSON.stringify(json, undefined, 2),
128
134
  'utf-8'
129
135
  );
@@ -149,8 +155,6 @@ export const getDefaultIconOptions = (): Required<IconJsonOptions> => ({
149
155
  saturation: 1,
150
156
  files: { associations: {} },
151
157
  languages: { associations: {} },
152
- showUpdateMessage: false,
153
- showWelcomeMessage: false,
154
158
  });
155
159
 
156
160
  /**
@@ -160,27 +164,27 @@ export const getDefaultIconOptions = (): Required<IconJsonOptions> => ({
160
164
  */
161
165
  const renameIconFiles = (iconJsonPath: string, options: IconJsonOptions) => {
162
166
  const customPaths = getCustomIconPaths(options);
163
- const defaultIconPath = path.join(iconJsonPath, '..', 'icons');
167
+ const defaultIconPath = join(iconJsonPath, '..', 'icons');
164
168
  const iconPaths = [defaultIconPath, ...customPaths];
165
169
 
166
170
  iconPaths.forEach((iconPath) => {
167
- fs.readdirSync(iconPath)
171
+ readdirSync(iconPath)
168
172
  .filter((f) => f.match(/\.svg/gi))
169
173
  .forEach((f) => {
170
- const filePath = path.join(iconPath, f);
174
+ const filePath = join(iconPath, f);
171
175
  const fileConfigHash = getFileConfigHash(options);
172
176
 
173
177
  // append file config to file name
174
- const newFilePath = path.join(
178
+ const newFilePath = join(
175
179
  iconPath,
176
180
  f.replace(/(^[^\.~]+)(.*)\.svg/, `$1${fileConfigHash}.svg`)
177
181
  );
178
182
 
179
183
  // if generated files are already in place, do not overwrite them
180
- if (filePath !== newFilePath && fs.existsSync(newFilePath)) {
181
- fs.unlinkSync(filePath);
184
+ if (filePath !== newFilePath && existsSync(newFilePath)) {
185
+ unlinkSync(filePath);
182
186
  } else {
183
- fs.renameSync(filePath, newFilePath);
187
+ renameSync(filePath, newFilePath);
184
188
  }
185
189
  });
186
190
  });
@@ -137,4 +137,5 @@ export const languageIcons: LanguageIcon[] = [
137
137
  { icon: { name: 'svelte' }, ids: ['svelte'] },
138
138
  { icon: { name: 'dart' }, ids: ['dart'] },
139
139
  { icon: { name: 'cadence' }, ids: ['cadence'] },
140
+ { icon: { name: 'stylable' }, ids: ['stylable'] },
140
141
  ];
@@ -1,11 +1,6 @@
1
1
  export interface Translation {
2
- themeInstalled: string;
3
- howToActivate: string;
4
2
  activate: string;
5
3
  activated: string;
6
- neverShowAgain: string;
7
- themeUpdated: string;
8
- readChangelog: string;
9
4
  iconPacks: {
10
5
  selectPack: string;
11
6
  description: string;
@@ -34,10 +29,6 @@ export interface Translation {
34
29
  enable: string;
35
30
  disable: string;
36
31
  };
37
- confirmReload: string;
38
- reload: string;
39
- outdatedVersion: string;
40
- updateVSCode: string;
41
32
  grayscale: {
42
33
  toggle: string;
43
34
  enable: string;
@@ -1,4 +1,4 @@
1
- import { IconJsonOptions } from './index';
1
+ import { IconJsonOptions } from './';
2
2
 
3
3
  export class IconConfiguration {
4
4
  file?: string;
@@ -14,8 +14,6 @@ export interface IconJsonOptions {
14
14
  languages?: {
15
15
  associations?: IconAssociations;
16
16
  };
17
- showWelcomeMessage?: boolean;
18
- showUpdateMessage?: boolean;
19
17
  }
20
18
 
21
19
  export interface IconAssociations {
@@ -1,4 +1,3 @@
1
1
  export * from './icons';
2
2
  export * from './i18n';
3
3
  export * from './iconConfiguration';
4
- export * from './helpers';
@@ -1,8 +1,8 @@
1
- import * as fs from 'fs';
2
- import * as https from 'https';
3
- import * as path from 'path';
1
+ import { writeFileSync } from 'fs';
2
+ import { request, RequestOptions } from 'https';
3
+ import { join } from 'path';
4
4
  import { Contributor } from '../../models/scripts/contributors/contributor';
5
- import * as painter from '../helpers/painter';
5
+ import { green, red, yellow } from '../helpers/painter';
6
6
  import { createScreenshot } from '../helpers/screenshots';
7
7
 
8
8
  /**
@@ -29,7 +29,7 @@ const fetchContributors = (
29
29
  page: string
30
30
  ): Promise<{ contributorsOfPage: Contributor[]; nextPage: string }> => {
31
31
  return new Promise((resolve, reject) => {
32
- const requestOptions: https.RequestOptions = {
32
+ const requestOptions: RequestOptions = {
33
33
  method: 'GET',
34
34
  hostname: 'api.github.com',
35
35
  path: `/repos/pkief/vscode-material-icon-theme/contributors?page=${page}`,
@@ -41,13 +41,13 @@ const fetchContributors = (
41
41
  },
42
42
  };
43
43
 
44
- const req = https.request(requestOptions, (res) => {
44
+ const req = request(requestOptions, (res) => {
45
45
  const { nextPage, lastPage, prevPage } = parseLinkHeader(
46
46
  res.headers?.link?.toString() ?? ''
47
47
  );
48
48
  console.log(
49
49
  '> Material Icon Theme:',
50
- painter.yellow(
50
+ yellow(
51
51
  `[${page}/${
52
52
  lastPage ? lastPage[1] : +prevPage[1] + 1
53
53
  }] Loading contributors from GitHub...`
@@ -90,8 +90,8 @@ const createContributorsList = (contributors: Contributor[]) => {
90
90
  const styling = '<link rel="stylesheet" href="contributors.css">';
91
91
  const generatedHtml = `${htmlDoctype}${styling}<ul>${list}</ul>`;
92
92
 
93
- const outputPath = path.join(__dirname, 'contributors.html');
94
- fs.writeFileSync(outputPath, generatedHtml);
93
+ const outputPath = join(__dirname, 'contributors.html');
94
+ writeFileSync(outputPath, generatedHtml);
95
95
  return outputPath;
96
96
  };
97
97
 
@@ -109,29 +109,29 @@ const init = async () => {
109
109
  if (contributorsList.length > 0) {
110
110
  console.log(
111
111
  '> Material Icon Theme:',
112
- painter.green('Successfully fetched all contributors from GitHub!')
112
+ green('Successfully fetched all contributors from GitHub!')
113
113
  );
114
114
  } else {
115
115
  console.log(
116
116
  '> Material Icon Theme:',
117
- painter.red('Error: Could not fetch contributors from GitHub!')
117
+ red('Error: Could not fetch contributors from GitHub!')
118
118
  );
119
119
  throw Error();
120
120
  }
121
121
  const outputPath = createContributorsList(contributorsList);
122
122
 
123
123
  // create the image
124
- console.log('> Material Icon Theme:', painter.yellow('Creating image...'));
124
+ console.log('> Material Icon Theme:', yellow('Creating image...'));
125
125
  const fileName = 'contributors';
126
126
  createScreenshot(outputPath, fileName)
127
127
  .then(() => {
128
128
  console.log(
129
129
  '> Material Icon Theme:',
130
- painter.green(`Successfully created ${fileName} image!`)
130
+ green(`Successfully created ${fileName} image!`)
131
131
  );
132
132
  })
133
133
  .catch(() => {
134
- throw Error(painter.red(`Error while creating ${fileName} image`));
134
+ throw Error(red(`Error while creating ${fileName} image`));
135
135
  });
136
136
  };
137
137
 
@@ -1,5 +1,5 @@
1
- import path from 'path';
2
- import puppeteer from 'puppeteer';
1
+ import { join } from 'path';
2
+ import Puppeteer from 'puppeteer';
3
3
 
4
4
  /**
5
5
  * Create a screenshot from an HTML file and save it as image.
@@ -8,8 +8,8 @@ import puppeteer from 'puppeteer';
8
8
  */
9
9
  export const createScreenshot = async (filePath: string, fileName: string) => {
10
10
  try {
11
- const htmlFilePath = path.join('file:', filePath);
12
- const browser = await puppeteer.launch();
11
+ const htmlFilePath = join('file:', filePath);
12
+ const browser = await Puppeteer.launch();
13
13
  const page = await browser.newPage();
14
14
  await page.setViewport({
15
15
  height: 10,
@@ -1,12 +1,12 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
1
+ import { readdir } from 'fs';
2
+ import { join, parse } from 'path';
3
3
  import {
4
4
  DefaultIcon,
5
5
  FileIcon,
6
6
  FolderIcon,
7
7
  FolderTheme,
8
8
  } from '../../../models/index';
9
- import * as painter from '../../helpers/painter';
9
+ import { green, red } from '../../helpers/painter';
10
10
  import { similarity } from '../../helpers/similarity';
11
11
  import {
12
12
  fileIcons,
@@ -20,7 +20,7 @@ import {
20
20
  /**
21
21
  * Defines the folder where all icon files are located.
22
22
  */
23
- const folderPath = path.join('icons');
23
+ const folderPath = join('icons');
24
24
 
25
25
  /**
26
26
  * Defines an array with all icons that can be found in the file system.
@@ -49,7 +49,7 @@ const fsReadAllIconFiles = (
49
49
 
50
50
  files.forEach((file) => {
51
51
  const fileName = file;
52
- const iconName = path.parse(file).name;
52
+ const iconName = parse(file).name;
53
53
  availableIcons[iconName] = fileName;
54
54
  });
55
55
 
@@ -63,7 +63,7 @@ const fsReadAllIconFiles = (
63
63
  };
64
64
 
65
65
  // read from the file system
66
- export const check = () => fs.readdir(folderPath, fsReadAllIconFiles);
66
+ export const check = () => readdir(folderPath, fsReadAllIconFiles);
67
67
 
68
68
  /**
69
69
  * Check if the file icons from the configuration are available on the file system.
@@ -152,12 +152,12 @@ const handleErrors = () => {
152
152
  if (amountOfErrors > 0) {
153
153
  console.log(
154
154
  '> Material Icon Theme:',
155
- painter.red(`Found ${amountOfErrors} error(s) in the icon configuration!`)
155
+ red(`Found ${amountOfErrors} error(s) in the icon configuration!`)
156
156
  );
157
157
  } else {
158
158
  console.log(
159
159
  '> Material Icon Theme:',
160
- painter.green('Passed icon availability checks!')
160
+ green('Passed icon availability checks!')
161
161
  );
162
162
  }
163
163
  logIconInformation(wrongIconNames.fileIcons, 'File icons');
@@ -179,11 +179,11 @@ const logIconInformation = (wrongIcons: string[], title: string) => {
179
179
  return similarity(icon, i) > 0.75;
180
180
  });
181
181
  const suggestionString = suggestion
182
- ? ` (Did you mean ${painter.green(suggestion)}?)`
182
+ ? ` (Did you mean ${green(suggestion)}?)`
183
183
  : '';
184
184
  const isWrongLightVersion = icon.endsWith(lightColorFileEnding);
185
185
  const isWrongLightVersionString = isWrongLightVersion
186
- ? ` (There is no light icon for ${painter.green(
186
+ ? ` (There is no light icon for ${green(
187
187
  icon.slice(0, -6)
188
188
  )}! Set the light option to false!)`
189
189
  : '';
@@ -191,12 +191,12 @@ const logIconInformation = (wrongIcons: string[], title: string) => {
191
191
  highContrastColorFileEnding
192
192
  );
193
193
  const isWrongHighContrastVersionString = isWrongHighContrastVersion
194
- ? ` (There is no high contrast icon for ${painter.green(
194
+ ? ` (There is no high contrast icon for ${green(
195
195
  icon.slice(0, -13)
196
196
  )}! Set the highContrast option to false!)`
197
197
  : '';
198
198
  console.log(
199
- painter.red(`Icon not found: ${icon}.svg`) +
199
+ red(`Icon not found: ${icon}.svg`) +
200
200
  `${suggestionString}${isWrongLightVersionString}${isWrongHighContrastVersionString}`
201
201
  );
202
202
  });
@@ -1,4 +1,4 @@
1
- import * as painter from '../../helpers/painter';
1
+ import { green, red } from '../../helpers/painter';
2
2
  import { fileIcons, folderIcons, languageIcons } from './../../../icons';
3
3
 
4
4
  /**
@@ -119,22 +119,20 @@ const handleErrors = () => {
119
119
  ...Object.keys(allConflicts.languageIcons),
120
120
  ].length > 0
121
121
  ) {
122
- console.log('> Material Icon Theme:', painter.red('Icon conflicts:'));
123
- console.log(painter.red('--------------------------------------'));
122
+ console.log('> Material Icon Theme:', red('Icon conflicts:'));
123
+ console.log(red('--------------------------------------'));
124
124
 
125
125
  printErrorMessage(allConflicts.fileIcons.fileExtensions, 'fileExtension');
126
126
  printErrorMessage(allConflicts.fileIcons.fileNames, 'fileName');
127
127
  printErrorMessage(allConflicts.folderIcons, 'folderName');
128
128
  printErrorMessage(allConflicts.languageIcons, 'languageId');
129
129
 
130
- console.log(
131
- '\n' + painter.red('Please check the wrong icon configurations!\n')
132
- );
130
+ console.log('\n' + red('Please check the wrong icon configurations!\n'));
133
131
  process.exit(1);
134
132
  } else {
135
133
  console.log(
136
134
  '> Material Icon Theme:',
137
- painter.green('Passed icon conflict checks!')
135
+ green('Passed icon conflict checks!')
138
136
  );
139
137
  }
140
138
  };
@@ -144,7 +142,7 @@ const printErrorMessage = (icons: any, definitionType: string) => {
144
142
  keys.forEach((key) => {
145
143
  const conflictIcons = icons[key];
146
144
  console.log(
147
- painter.red(
145
+ red(
148
146
  `For ${definitionType} "${key}" are ${
149
147
  conflictIcons.length
150
148
  } icons defined: [${conflictIcons.join(', ')}]`
@@ -1,6 +1,7 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
1
+ import { readdir } from 'fs';
2
+ import { join, parse } from 'path';
3
3
  import { DefaultIcon, FolderIcon, FolderTheme } from '../../../models/index';
4
+ import { green, red } from '../../helpers/painter';
4
5
  import {
5
6
  fileIcons,
6
7
  folderIcons,
@@ -9,12 +10,11 @@ import {
9
10
  lightColorFileEnding,
10
11
  openedFolder,
11
12
  } from './../../../icons';
12
- import * as painter from './../../helpers/painter';
13
13
 
14
14
  /**
15
15
  * Defines the folder where all icon files are located.
16
16
  */
17
- const folderPath = path.join('icons');
17
+ const folderPath = join('icons');
18
18
 
19
19
  /**
20
20
  * Defines an array with all icons that can be found in the file system.
@@ -34,7 +34,7 @@ const fsReadAllIconFiles = (
34
34
 
35
35
  files.forEach((file) => {
36
36
  const fileName = file;
37
- const iconName = path.parse(file).name;
37
+ const iconName = parse(file).name;
38
38
  availableIcons[iconName] = fileName;
39
39
  });
40
40
 
@@ -57,24 +57,20 @@ const checkUsageOfAllIcons = () => {
57
57
  const handleErrors = () => {
58
58
  const amountOfUnusedIcons = Object.keys(availableIcons).length;
59
59
  if (amountOfUnusedIcons === 0) {
60
- console.log(
61
- '> Material Icon Theme:',
62
- painter.green('Passed icon usage checks!')
63
- );
60
+ console.log('> Material Icon Theme:', green('Passed icon usage checks!'));
64
61
  } else {
65
62
  console.log(
66
- '> Material Icon Theme: ' +
67
- painter.red(`${amountOfUnusedIcons} unused icon(s):`)
63
+ '> Material Icon Theme: ' + red(`${amountOfUnusedIcons} unused icon(s):`)
68
64
  );
69
65
  Object.keys(availableIcons).forEach((icon) => {
70
- console.log(painter.red(`- ${availableIcons[icon]}`));
66
+ console.log(red(`- ${availableIcons[icon]}`));
71
67
  });
72
68
  throw new Error('Found unused icon files!');
73
69
  }
74
70
  };
75
71
 
76
72
  // read from the file system
77
- export const check = () => fs.readdir(folderPath, fsReadAllIconFiles);
73
+ export const check = () => readdir(folderPath, fsReadAllIconFiles);
78
74
 
79
75
  const getAllUsedFileIcons = (): string[] => {
80
76
  return [
@@ -1,7 +1,7 @@
1
- import * as checkAvailability from './checkIconAvailability';
2
- import * as checkIconConflicts from './checkIconConflicts';
3
- import * as checkIconUsage from './checkIconUsage';
1
+ import { check as checkAvailability } from './checkIconAvailability';
2
+ import { check as checkIconConflicts } from './checkIconConflicts';
3
+ import { check as checkIconUsage } from './checkIconUsage';
4
4
 
5
- checkAvailability.check();
6
- checkIconUsage.check();
7
- checkIconConflicts.check();
5
+ checkAvailability();
6
+ checkIconUsage();
7
+ checkIconConflicts();
@@ -1,11 +1,11 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
1
+ import { writeFileSync } from 'fs';
2
+ import { join } from 'path';
3
+ import { green, red } from '../helpers/painter';
3
4
  import { createScreenshot } from '../helpers/screenshots';
4
- import * as painter from './../helpers/painter';
5
5
  import { toTitleCase } from './../helpers/titleCase';
6
6
 
7
7
  const htmlDoctype = '<!DOCTYPE html>';
8
- const cssFilePath = path.join('style.css');
8
+ const cssFilePath = 'style.css';
9
9
  const styling = `<link rel="stylesheet" href="${cssFilePath}">`;
10
10
 
11
11
  const createHTMLTableHeadRow = (amount: number) => {
@@ -69,23 +69,21 @@ const savePreview = (
69
69
  size: number,
70
70
  icons: IconDefinition[][]
71
71
  ) => {
72
- const filePath = path.join(__dirname, fileName + '.html');
72
+ const filePath = join(__dirname, fileName + '.html');
73
73
 
74
74
  // write the html file with the icon table
75
- fs.writeFileSync(filePath, createPreviewTable(icons, size));
75
+ writeFileSync(filePath, createPreviewTable(icons, size));
76
76
 
77
77
  // create the image
78
78
  createScreenshot(filePath, fileName)
79
79
  .then(() => {
80
80
  console.log(
81
81
  '> Material Icon Theme:',
82
- painter.green(`Successfully created ${fileName} preview image!`)
82
+ green(`Successfully created ${fileName} preview image!`)
83
83
  );
84
84
  })
85
85
  .catch(() => {
86
- throw Error(
87
- painter.red(`Error while creating ${fileName} preview image`)
88
- );
86
+ throw Error(red(`Error while creating ${fileName} preview image`));
89
87
  });
90
88
  };
91
89
 
@@ -1,15 +1,15 @@
1
- import * as path from 'path';
1
+ import { resolve } from 'path';
2
2
  import { runTests } from 'vscode-test';
3
3
 
4
4
  const main = async () => {
5
5
  try {
6
6
  // The folder containing the Extension Manifest package.json
7
7
  // Passed to `--extensionDevelopmentPath`
8
- const extensionDevelopmentPath = path.resolve(__dirname, '../../');
8
+ const extensionDevelopmentPath = resolve(__dirname, '../../');
9
9
 
10
10
  // The path to the extension test script
11
11
  // Passed to --extensionTestsPath
12
- const extensionTestsPath = path.resolve(__dirname, './spec/index');
12
+ const extensionTestsPath = resolve(__dirname, './spec/index');
13
13
 
14
14
  // Download VS Code, unzip it and run the integration test
15
15
  await runTests({