-
Notifications
You must be signed in to change notification settings - Fork 2.4k
add feature: vs code intellisense to devicon.json
#1487
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4017c38
Add VS Code Intellisense to `devicon.json`
lunatic-fox 33ef944
Fix name pattern and add `dot-net` exception
lunatic-fox dbfa8eb
Update .vscode/devicon-schema.json
lunatic-fox bb91312
Update .vscode/devicon.code-snippets
lunatic-fox 3e877f7
Update .vscode/devicon-schema.json
lunatic-fox b68c6e5
Update .vscode/devicon-schema.json
lunatic-fox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"definitions": { | ||
"IconVersions": { | ||
"type": "string", | ||
"enum": [ | ||
"original", | ||
"plain", | ||
"line", | ||
"original-wordmark", | ||
"plain-wordmark", | ||
"line-wordmark" | ||
] | ||
}, | ||
"IconVersionsArray": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/IconVersions" | ||
} | ||
} | ||
}, | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"title": "The official name of the technology.", | ||
"description": "Pattern: Only lower-case letters and digits.", | ||
"pattern": "^(dot-net|[0-9a-z]+)$" | ||
}, | ||
"altnames": { | ||
"type": "array", | ||
"title": "List of alternative names for this technology.", | ||
"description": "Used for the searchbar on the Devicon website. https://devicon.dev", | ||
"uniqueItems": true, | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"tags": { | ||
"type": "array", | ||
"title": "List of tags relating to the technology for categorization/search purpose.", | ||
"$ref": "./tags-enum.json/#/definitions/Tags" | ||
}, | ||
"versions": { | ||
"title": "Keeps track of the different versions that you have.", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"svg": { | ||
"title": "List all the SVGs that you have.", | ||
"contains": { | ||
"$ref": "#/definitions/IconVersions" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"$ref": "#/definitions/IconVersionsArray" | ||
}, | ||
"font": { | ||
"title": "List only the SVGs that can be converted to fonts. Usually refers to \"plain\" and \"line\" versions but \"original\" can be accepted.", | ||
"description": "DO NOT list aliases here! In this case use \"aliases\" property!", | ||
"contains": { | ||
"$ref": "#/definitions/IconVersions" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"$ref": "#/definitions/IconVersionsArray" | ||
} | ||
} | ||
}, | ||
"color": { | ||
"title": "The official/main hexadecimal color of the logo. [Case insensitive]", | ||
"description": "Pattern example: #FFFFFF", | ||
"type": "string", | ||
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" | ||
}, | ||
"aliases": { | ||
"title": "Keeps track of the aliases for the font versions ONLY.", | ||
lunatic-fox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"description": "Can be empty, or contain objects, each with an alias and a base version. More info here: https://github.com/devicons/devicon/wiki/Updating-%60devicon.json%60#aliases-and-aliasobj", | ||
"type": "array", | ||
"items": { | ||
"title": "AliasObj, an object containing an alias and a base version", | ||
"type": "object", | ||
lunatic-fox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"additionalProperties": false, | ||
"properties": { | ||
"base": { | ||
"title": "The SVG file you are using as source for the alias.", | ||
"$ref": "#/definitions/IconVersions" | ||
}, | ||
"alias": { | ||
"title": "The new name (alias) that you want to generate.", | ||
"$ref": "#/definitions/IconVersions" | ||
} | ||
}, | ||
"required": [ | ||
"base", | ||
"alias" | ||
], | ||
"allOf": [ | ||
{ | ||
"if": { | ||
"properties": { | ||
"base": { | ||
"const": "original" | ||
} | ||
} | ||
}, | ||
"then": { | ||
"not": { | ||
"properties": { | ||
"alias": { | ||
"const": "original" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"base": { | ||
"const": "plain" | ||
} | ||
} | ||
}, | ||
"then": { | ||
"not": { | ||
"properties": { | ||
"alias": { | ||
"const": "plain" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"base": { | ||
"const": "line" | ||
} | ||
} | ||
}, | ||
"then": { | ||
"not": { | ||
"properties": { | ||
"alias": { | ||
"const": "line" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"base": { | ||
"const": "original-wordmark" | ||
} | ||
} | ||
}, | ||
"then": { | ||
"not": { | ||
"properties": { | ||
"alias": { | ||
"const": "original-wordmark" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"base": { | ||
"const": "plain-wordmark" | ||
} | ||
} | ||
}, | ||
"then": { | ||
"not": { | ||
"properties": { | ||
"alias": { | ||
"const": "plain-wordmark" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"base": { | ||
"const": "line-wordmark" | ||
} | ||
} | ||
}, | ||
"then": { | ||
"not": { | ||
"properties": { | ||
"alias": { | ||
"const": "line-wordmark" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"altnames", | ||
"tags", | ||
"versions", | ||
"color", | ||
"aliases" | ||
] | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"new entry": { | ||
"scope": "json", | ||
lunatic-fox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"prefix": "new", | ||
"description": "Inserts the new entry template object. Use it ONLY in \"devicon.json\"!", | ||
"body": [ | ||
"{", | ||
" \"name\": \"\",", | ||
" \"altnames\": [],", | ||
" \"tags\": [],", | ||
" \"versions\": {", | ||
" \"svg\": [", | ||
" \"\"", | ||
" ],", | ||
" \"font\": [", | ||
" \"\"", | ||
" ]", | ||
" },", | ||
" \"color\": \"\",", | ||
" \"aliases\": []", | ||
"}," | ||
] | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": [ | ||
"devicon.json" | ||
], | ||
"url": "/.vscode/devicon-schema.json" | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.