Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new icons for files in .vscode folder #2335

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,23 @@ It is also possible to use patterns for file names and extensions. This is usefu

```ts
{
name: 'sample',
name: 'graphql',
patterns: {
sample: ['ecmascript'],
}
graphql: FileNamePattern.Ecmascript,
},
}
```

In case of this example the generated file names are "sample.js", "sample.mjs", "sample.cjs",
sample.ts", "sample.mts" and "sample.cts". The pattern is defined in the [patterns.ts](src/icons/patterns/utils.ts) file.
In case of this example the generated file names are "graphql.js", "graphql.mjs", "graphql.cjs", "graphql.ts", "graphql.mts" and "graphql.cts". The pattern is defined in the [patterns.ts](src/icons/patterns/patterns.ts) file.

Allowed patterns are right now:
Available patterns are right now:

| Pattern | File extensions |
| ------------- | ---------------------------------------------------------------------------------------------------------- |
| ecmascript | `js`, `mjs`, `cjs`, `ts`, `mts`, `cts` |
| configuration | `json`, `jsonc`, `json5`, `yaml`, `yml`, `toml` |
| nodeEcosystem | Combination of ecmascript and configuration patterns |
| cosmiconfig | Similar to nodeEcosystem but in form of `.${fileName}rc`, `.config/${fileName}rc` and `${fileName}.config` |
| cosmiconfig | `.${fileName}rc`, `.config/${fileName}rc` and `${fileName}.config` with file extensions of `nodeEcosystem` |

#### Folder icons

Expand Down
1 change: 1 addition & 0 deletions icons/extension.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/launch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/tasks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
118 changes: 65 additions & 53 deletions src/icons/fileIcons.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FileIcons, IconPack } from '../models/index';
import { parseByPattern } from './patterns/libs';
import { cosmiconfig, ecmascript } from './patterns/utils';
import { FileIcons, FileNamePattern, IconPack } from '../models';
import { parseByPattern } from './patterns';

/**
* Defines file icons
Expand Down Expand Up @@ -249,6 +248,7 @@ export const fileIcons: FileIcons = {
'manifest.mf',
'.clang-format',
'.clang-tidy',
'.vscode/settings.json',
],
},
{
Expand Down Expand Up @@ -673,7 +673,7 @@ export const fileIcons: FileIcons = {
fileExtensions: ['graphql', 'gql'],
fileNames: ['.graphqlconfig'],
patterns: {
graphql: cosmiconfig,
graphql: FileNamePattern.Ecmascript,
},
},
{ name: 'rust', fileExtensions: ['rs', 'ron'] },
Expand Down Expand Up @@ -973,14 +973,14 @@ export const fileIcons: FileIcons = {
fileExtensions: ['pcss', 'sss'],
fileNames: [],
patterns: {
postcss: cosmiconfig,
postcss: FileNamePattern.Cosmiconfig,
},
},
{
name: 'posthtml',
fileNames: [],
patterns: {
posthtml: cosmiconfig,
posthtml: FileNamePattern.Cosmiconfig,
},
},
{
Expand Down Expand Up @@ -1013,41 +1013,41 @@ export const fileIcons: FileIcons = {
name: 'webpack',
fileNames: ['webpack.config.coffee'],
patterns: {
'webpack.base': ecmascript,
'webpack.client': ecmascript,
'webpack.common': ecmascript,
'webpack.config.babel': ecmascript,
'webpack.config.base.babel': ecmascript,
'webpack.config.base': ecmascript,
'webpack.config.client': ecmascript,
'webpack.config.common.babel': ecmascript,
'webpack.config.common': ecmascript,
'webpack.config.dev.babel': ecmascript,
'webpack.config.dev': ecmascript,
'webpack.config.main': ecmascript,
'webpack.config.prod.babel': ecmascript,
'webpack.config.prod': ecmascript,
'webpack.config.production.babel': ecmascript,
'webpack.config.production': ecmascript,
'webpack.config.renderer': ecmascript,
'webpack.config.server': ecmascript,
'webpack.config.staging.babel': ecmascript,
'webpack.config.staging': ecmascript,
'webpack.config.test': ecmascript,
'webpack.config.vendor.production': ecmascript,
'webpack.config.vendor': ecmascript,
'webpack.config': ecmascript,
'webpack.dev': ecmascript,
'webpack.development': ecmascript,
'webpack.dist': ecmascript,
'webpack.mix': ecmascript,
'webpack.prod.config': ecmascript,
'webpack.prod': ecmascript,
'webpack.production': ecmascript,
'webpack.server': ecmascript,
'webpack.test': ecmascript,
webpack: ecmascript,
webpackfile: ecmascript,
'webpack.base': FileNamePattern.Ecmascript,
'webpack.client': FileNamePattern.Ecmascript,
'webpack.common': FileNamePattern.Ecmascript,
'webpack.config.babel': FileNamePattern.Ecmascript,
'webpack.config.base.babel': FileNamePattern.Ecmascript,
'webpack.config.base': FileNamePattern.Ecmascript,
'webpack.config.client': FileNamePattern.Ecmascript,
'webpack.config.common.babel': FileNamePattern.Ecmascript,
'webpack.config.common': FileNamePattern.Ecmascript,
'webpack.config.dev.babel': FileNamePattern.Ecmascript,
'webpack.config.dev': FileNamePattern.Ecmascript,
'webpack.config.main': FileNamePattern.Ecmascript,
'webpack.config.prod.babel': FileNamePattern.Ecmascript,
'webpack.config.prod': FileNamePattern.Ecmascript,
'webpack.config.production.babel': FileNamePattern.Ecmascript,
'webpack.config.production': FileNamePattern.Ecmascript,
'webpack.config.renderer': FileNamePattern.Ecmascript,
'webpack.config.server': FileNamePattern.Ecmascript,
'webpack.config.staging.babel': FileNamePattern.Ecmascript,
'webpack.config.staging': FileNamePattern.Ecmascript,
'webpack.config.test': FileNamePattern.Ecmascript,
'webpack.config.vendor.production': FileNamePattern.Ecmascript,
'webpack.config.vendor': FileNamePattern.Ecmascript,
'webpack.config': FileNamePattern.Ecmascript,
'webpack.dev': FileNamePattern.Ecmascript,
'webpack.development': FileNamePattern.Ecmascript,
'webpack.dist': FileNamePattern.Ecmascript,
'webpack.mix': FileNamePattern.Ecmascript,
'webpack.prod.config': FileNamePattern.Ecmascript,
'webpack.prod': FileNamePattern.Ecmascript,
'webpack.production': FileNamePattern.Ecmascript,
'webpack.server': FileNamePattern.Ecmascript,
'webpack.test': FileNamePattern.Ecmascript,
webpack: FileNamePattern.Ecmascript,
webpackfile: FileNamePattern.Ecmascript,
},
},
{ name: 'ionic', fileNames: ['ionic.config.json', '.io-config.json'] },
Expand Down Expand Up @@ -1130,8 +1130,8 @@ export const fileIcons: FileIcons = {
name: 'babel',
fileNames: ['babel-transform.js'],
patterns: {
babel: cosmiconfig,
'babel-plugin-macros': cosmiconfig,
babel: FileNamePattern.Cosmiconfig,
'babel-plugin-macros': FileNamePattern.Cosmiconfig,
},
},
{
Expand Down Expand Up @@ -1249,7 +1249,7 @@ export const fileIcons: FileIcons = {
'.eslintrc.base.json',
],
patterns: {
eslint: cosmiconfig,
eslint: FileNamePattern.Cosmiconfig,
},
},
{
Expand Down Expand Up @@ -1339,15 +1339,15 @@ export const fileIcons: FileIcons = {
light: true,
fileNames: ['.stylelintignore', '.stylelintcache'],
patterns: {
stylelint: cosmiconfig,
stylelint: FileNamePattern.Cosmiconfig,
},
},
{ name: 'code-climate', fileNames: ['.codeclimate.yml'], light: true },
{
name: 'prettier',
fileNames: ['.prettierignore'],
patterns: {
prettier: cosmiconfig,
prettier: FileNamePattern.Cosmiconfig,
},
},
{
Expand Down Expand Up @@ -1535,7 +1535,7 @@ export const fileIcons: FileIcons = {
light: true,
fileNames: [],
patterns: {
release: cosmiconfig,
release: FileNamePattern.Cosmiconfig,
},
},
{
Expand Down Expand Up @@ -1788,7 +1788,7 @@ export const fileIcons: FileIcons = {
name: 'husky',
fileNames: [],
patterns: {
husky: cosmiconfig,
husky: FileNamePattern.Cosmiconfig,
},
},
{ name: 'coconut', fileExtensions: ['coco'] },
Expand All @@ -1815,7 +1815,7 @@ export const fileIcons: FileIcons = {
name: 'commitlint',
fileNames: ['.commitlint.yaml', '.commitlint.yml'],
patterns: {
commitlint: cosmiconfig,
commitlint: FileNamePattern.Cosmiconfig,
},
},
{ name: 'buck', fileNames: ['.buckconfig'] },
Expand Down Expand Up @@ -2177,7 +2177,7 @@ export const fileIcons: FileIcons = {
name: 'svgr',
fileNames: [],
patterns: {
svgr: cosmiconfig,
svgr: FileNamePattern.Cosmiconfig,
},
},
{ name: 'rome', fileNames: ['rome.json'] },
Expand Down Expand Up @@ -2284,7 +2284,7 @@ export const fileIcons: FileIcons = {
name: 'craco',
fileNames: [],
patterns: {
craco: cosmiconfig,
craco: FileNamePattern.Cosmiconfig,
},
},
{
Expand Down Expand Up @@ -2340,7 +2340,7 @@ export const fileIcons: FileIcons = {
name: 'syncpack',
fileNames: [],
patterns: {
syncpack: cosmiconfig,
syncpack: FileNamePattern.Cosmiconfig,
},
},
{
Expand Down Expand Up @@ -2394,7 +2394,7 @@ export const fileIcons: FileIcons = {
name: 'puppeteer',
fileNames: [],
patterns: {
puppeteer: cosmiconfig,
puppeteer: FileNamePattern.Cosmiconfig,
},
},
{ name: 'apps-script', fileExtensions: ['gs'] },
Expand Down Expand Up @@ -2422,5 +2422,17 @@ export const fileIcons: FileIcons = {
name: 'container',
fileNames: ['.devcontainer/devcontainer.json'],
},
{
name: 'extension',
fileNames: ['.vscode/extensions.json'],
},
{
name: 'tasks',
fileNames: ['.vscode/tasks.json'],
},
{
name: 'launch',
fileNames: ['.vscode/launch.json'],
},
]),
};
File renamed without changes.
28 changes: 0 additions & 28 deletions src/icons/patterns/libs.ts

This file was deleted.

Loading