Skip to content

Commit

Permalink
Update logo
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Nov 12, 2023
1 parent 347ddc9 commit 0f56d5d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 74 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
versionChange:
type: choice
description: Select the version change
requried: true
required: true
options:
- major
- minor
Expand All @@ -19,14 +19,15 @@ jobs:
VERSION_CHANGE: ${{ github.event.inputs.versionChange }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js ⚙️
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install node_modules 📦
run: |
npm ci
Expand Down
56 changes: 7 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,28 @@
<h1 align="center">
<br>
<img src="https://github.com/PKief/vscode-icon-theme-reviewer/raw/main/logo.png" alt="logo" width="200">
<img src="./logo.png" alt="logo" width="200">
<br><br>
SVG Color Linter
SVG Icon Review
<br>
<br>
</h1>

<h4 align="center">Linting tool to check if SVG files only use colors of a given color palette.</h4>
<h4 align="center">Tool to review SVG icons automatically</h4>

## CLI Command

The tool can be executed with this command:

```
npx vscode-icon-theme-reviewer file1.svg file2.svg
```

It will fetch all the colors of a YAML file which must have the following structure:

```yaml
colors:
- '#FFEBEE'
- '#FFCDD2'
- '#EF9A9A'
- '#E57373'
- '#EF5350'
- '#F44336'
npx svg-icon-review file1.svg file2.svg
```

It also supports glob file patterns to check multiple files matching the pattern like this:

```
npx vscode-icon-theme-reviewer --colors colors.yml ./images/**/*.svg ./another-dir/*.svg test.svg
```

## Programmatic use

The tool can be imported as module into existing JavaScript or TypeScript code. Therefor it is necessary to install it via npm or yarn:

NPM:

```
npm install --save-dev vscode-icon-theme-reviewer
```

Yarn:

```
yarn add --dev vscode-icon-theme-reviewer
npx svg-icon-review ./images/**/*.svg
```

The module can be imported like this:

```ts
import { isColorInPalette, getSuggestions } from 'vscode-icon-theme-reviewer';
The output is a preview of how the icons look in either dark or light backgrounds:

isColorInPalette('#FFFFFF', ['#EEEEEE', '#121212']);
// false

getSuggestions('#C0CA35', ['#EEEEEE', '#121212']);
// [
// { hex: '#C0CA33', distance: 0.160467661071053 },
// { hex: '#CDDC39', distance: 4.307076277707079 },
// { hex: '#D4E157', distance: 5.606714639567858 },
// { hex: '#AFB42B', distance: 5.713845679863578 },
// { hex: '#DCE775', distance: 8.065940911169271 }
// ]
```
<img src="./images/preview.png" alt="logo" >
Binary file added images/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "vscode-icon-theme-reviewer",
"displayName": "VS Code Icon Theme Reviewer",
"name": "svg-icon-review",
"displayName": "SVG Icon Review",
"version": "0.1.0",
"description": "Able to review pull requests of icon themes in VS Code",
"description": "Tool to review SVG icons automatically",
"main": "./lib/index.js",
"module": "./lib/index.js",
"bin": {
"vscode-icon-theme-reviewer": "./bin/cli.js"
"svg-icon-review": "./bin/cli.js"
},
"scripts": {
"start": "node ./bin/cli.js *.svg",
Expand All @@ -22,11 +22,10 @@
"lib/"
],
"keywords": [
"VS Code",
"VS Code extension",
"Extensions",
"SVG icon",
"Preview"
"icons",
"SVG",
"Tooling",
"CLI"
],
"engines": {
"node": ">=4.2.0"
Expand All @@ -39,19 +38,17 @@
"funding": "https://github.com/sponsors/pkief",
"license": "MIT",
"bugs": {
"url": "https://github.com/PKief/vscode-icon-theme-reviewer/issues"
"url": "https://github.com/PKief/svg-icon-review/issues"
},
"homepage": "https://github.com/PKief/vscode-icon-theme-reviewer/blob/main/README.md",
"homepage": "https://github.com/PKief/svg-icon-review/blob/main/README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/PKief/vscode-icon-theme-reviewer.git"
"url": "git+https://github.com/PKief/svg-icon-review.git"
},
"devDependencies": {
"@types/chroma-js": "^2.1.3",
"@types/glob": "^7.2.0",
"@types/is-glob": "^4.0.2",
"@types/jest": "^27.4.0",
"@types/js-yaml": "^4.0.5",
"@types/minimist": "^1.2.2",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
Expand All @@ -68,7 +65,6 @@
"glob": "^7.2.0",
"is-glob": "^4.0.3",
"is-svg": "^4.3.2",
"js-yaml": "^4.1.0",
"minimist": "^1.2.5",
"puppeteer": "^21.5.0"
}
Expand Down

0 comments on commit 0f56d5d

Please sign in to comment.