mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-17 14:27:41 +01:00
Compare commits
5 Commits
update-sit
...
lucide-vue
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1d57d3c85 | ||
|
|
701c2fb6b2 | ||
|
|
294ec9c727 | ||
|
|
99c883e60a | ||
|
|
9e68779d22 |
@@ -1,11 +0,0 @@
|
|||||||
# Custom words
|
|
||||||
fullscreen
|
|
||||||
gamepad
|
|
||||||
gantt
|
|
||||||
kanban
|
|
||||||
pilcrow
|
|
||||||
squircle
|
|
||||||
strikethrough
|
|
||||||
touchpad
|
|
||||||
ungroup
|
|
||||||
toc
|
|
||||||
@@ -6,5 +6,6 @@ tests
|
|||||||
node_modules
|
node_modules
|
||||||
.eslintrc.js
|
.eslintrc.js
|
||||||
docs/images
|
docs/images
|
||||||
docs/**/examples/
|
docs/guide/basics/examples
|
||||||
|
docs/guide/advanced/examples
|
||||||
packages/lucide-react/dynamicIconImports.js
|
packages/lucide-react/dynamicIconImports.js
|
||||||
|
|||||||
19
.eslintrc.js
19
.eslintrc.js
@@ -1,4 +1,4 @@
|
|||||||
const DEFAULT_ATTRS = require('./tools/build-icons/render/default-attrs.json');
|
const DEFAULT_ATTRS = require('./scripts/render/default-attrs.json');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
@@ -15,9 +15,7 @@ module.exports = {
|
|||||||
'no-use-before-define': 'off',
|
'no-use-before-define': 'off',
|
||||||
'import/no-extraneous-dependencies': [
|
'import/no-extraneous-dependencies': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{ devDependencies: ['**/*.test.js', '**/*.spec.js', './scripts/**'] },
|
||||||
devDependencies: ['**/*.test.js', '**/*.spec.js', '**/scripts/**'],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
'import/extensions': [
|
'import/extensions': [
|
||||||
'error',
|
'error',
|
||||||
@@ -44,15 +42,12 @@ module.exports = {
|
|||||||
'@html-eslint/no-duplicate-attrs': 'error',
|
'@html-eslint/no-duplicate-attrs': 'error',
|
||||||
'@html-eslint/no-inline-styles': 'error',
|
'@html-eslint/no-inline-styles': 'error',
|
||||||
'@html-eslint/require-attrs': [
|
'@html-eslint/require-attrs': [
|
||||||
'error',
|
'error',
|
||||||
...Object.entries(DEFAULT_ATTRS).map(([attr, value]) => ({
|
...Object.entries(DEFAULT_ATTRS)
|
||||||
tag: 'svg',
|
.map(([attr, value]) => ({ tag: 'svg', attr, value: String(value) }))
|
||||||
attr,
|
|
||||||
value: String(value),
|
|
||||||
})),
|
|
||||||
],
|
],
|
||||||
'@html-eslint/indent': ['error', 2],
|
'@html-eslint/indent': ['error', 2],
|
||||||
'@html-eslint/no-multiple-empty-lines': ['error', { max: 0 }],
|
"@html-eslint/no-multiple-empty-lines": ["error", { "max": 0 }],
|
||||||
'@html-eslint/no-extra-spacing-attrs': [
|
'@html-eslint/no-extra-spacing-attrs': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
@@ -69,7 +64,7 @@ module.exports = {
|
|||||||
'@html-eslint/element-newline': 'error',
|
'@html-eslint/element-newline': 'error',
|
||||||
'@html-eslint/no-trailing-spaces': 'error',
|
'@html-eslint/no-trailing-spaces': 'error',
|
||||||
'@html-eslint/quotes': 'error',
|
'@html-eslint/quotes': 'error',
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
10
.github/ISSUE_TEMPLATE/01_icon_request.yml
vendored
10
.github/ISSUE_TEMPLATE/01_icon_request.yml
vendored
@@ -7,10 +7,8 @@ body:
|
|||||||
value: |
|
value: |
|
||||||
Before submitting an icon request check if it has already been requested. If there is an open request, please add a 👍.
|
Before submitting an icon request check if it has already been requested. If there is an open request, please add a 👍.
|
||||||
|
|
||||||
> [!CAUTION]
|
**Important note**: No new brand logos are allowed, see https://github.com/lucide-icons/lucide/issues/670.
|
||||||
> New brand logos are **not** allowed, see our official statement: https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md.
|
Existing brand icons will also be phased out. For brand icons, consider using https://simpleicons.org, which offers purpose-built SVGs that are also on a 24×24px grid.
|
||||||
>
|
|
||||||
> Existing brand icons are being phased out. Consider using https://simpleicons.org, which offers purpose-built SVGs that are also on a 24×24px grid.
|
|
||||||
- type: input
|
- type: input
|
||||||
id: name
|
id: name
|
||||||
attributes:
|
attributes:
|
||||||
@@ -43,9 +41,9 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I have searched existing icons to make sure it does not already exist and I didn't find any.
|
- label: I have searched existing icons to make sure it does not already exist and I didn't find any.
|
||||||
required: true
|
required: true
|
||||||
- label: I am not requesting a brand logo and the art is not protected by copyright, see more at https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md
|
- label: I am not requesting a brand logo and the art is not protected by copyright.
|
||||||
required: true
|
required: true
|
||||||
- label: I am not requesting an icon that includes religious, war/violence related, political imagery or hate symbols.
|
- label: I am not requesting an icon that includes religious, political imagery or hate symbols.
|
||||||
required: true
|
required: true
|
||||||
- label: I have provided appropriate use cases for the icon(s) requested.
|
- label: I have provided appropriate use cases for the icon(s) requested.
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
14
.github/ISSUE_TEMPLATE/02_bug_report.yml
vendored
14
.github/ISSUE_TEMPLATE/02_bug_report.yml
vendored
@@ -22,7 +22,6 @@ body:
|
|||||||
- label: lucide-svelte
|
- label: lucide-svelte
|
||||||
- label: lucide-vue
|
- label: lucide-vue
|
||||||
- label: lucide-vue-next
|
- label: lucide-vue-next
|
||||||
- label: lucide-astro
|
|
||||||
- label: Figma plugin
|
- label: Figma plugin
|
||||||
- label: source/main
|
- label: source/main
|
||||||
- label: other/not relevant
|
- label: other/not relevant
|
||||||
@@ -36,16 +35,6 @@ body:
|
|||||||
placeholder: e.g. 0.289.1
|
placeholder: e.g. 0.289.1
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: checkboxes
|
|
||||||
id: can-reproduce-in-latest-version
|
|
||||||
attributes:
|
|
||||||
label: Can you reproduce this in the latest version?
|
|
||||||
description: i.e. after running `npm install lucide-react@latest`
|
|
||||||
options:
|
|
||||||
- label: 'Yes'
|
|
||||||
- label: 'No'
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
id: browsers
|
id: browsers
|
||||||
attributes:
|
attributes:
|
||||||
@@ -70,9 +59,6 @@ body:
|
|||||||
- label: Windows
|
- label: Windows
|
||||||
- label: Linux
|
- label: Linux
|
||||||
- label: macOS
|
- label: macOS
|
||||||
- label: ChromeOS
|
|
||||||
- label: iOS
|
|
||||||
- label: Android
|
|
||||||
- label: Other/not relevant
|
- label: Other/not relevant
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ body:
|
|||||||
- label: Windows
|
- label: Windows
|
||||||
- label: Linux
|
- label: Linux
|
||||||
- label: macOS
|
- label: macOS
|
||||||
- label: ChromeOS
|
|
||||||
- label: iOS
|
|
||||||
- label: Android
|
|
||||||
- label: Other/not relevant
|
- label: Other/not relevant
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ body:
|
|||||||
- label: lucide-svelte
|
- label: lucide-svelte
|
||||||
- label: lucide-vue
|
- label: lucide-vue
|
||||||
- label: lucide-vue-next
|
- label: lucide-vue-next
|
||||||
- label: lucide-astro
|
|
||||||
- label: Figma plugin
|
- label: Figma plugin
|
||||||
- label: all JS packages
|
- label: all JS packages
|
||||||
- label: site
|
- label: site
|
||||||
|
|||||||
44
.github/actions/build-and-test.yml
vendored
Normal file
44
.github/actions/build-and-test.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name: "Build and Test"
|
||||||
|
description: "Builds and test a package"
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: “Name of the package”
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
name: Install pnpm
|
||||||
|
id: pnpm-install
|
||||||
|
with:
|
||||||
|
version: 8
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
id: pnpm-cache
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --filter lucide-preact
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm --filter lucide-preact build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: pnpm --filter lucide-preact test
|
||||||
41
.github/actions/check-icons.yml
vendored
Normal file
41
.github/actions/check-icons.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: "Check icons"
|
||||||
|
description: "Cross-checks icon and category references in JSON descriptors"
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: “Name of the package”
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
name: Install pnpm
|
||||||
|
id: pnpm-install
|
||||||
|
with:
|
||||||
|
version: 8
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
id: pnpm-cache
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --filter .
|
||||||
|
|
||||||
|
- name: Check icons and categories
|
||||||
|
run: pnpm checkIcons
|
||||||
102
.github/labeler.yml
vendored
102
.github/labeler.yml
vendored
@@ -1,98 +1,92 @@
|
|||||||
# For changed dependencies
|
# For changed dependencies
|
||||||
📦 dependencies:
|
📦 dependencies:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
# For changes in documentation
|
# For changes in documentation
|
||||||
📖 documentation:
|
📖 documentation:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- docs/*.md
|
- docs/*.md
|
||||||
- docs/**/*.md
|
- docs/**/*.md
|
||||||
|
|
||||||
# For changes in the site, but not markdown files
|
# For changes in the site, but not markdown files
|
||||||
🌍 site:
|
🌍 site:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
|
|
||||||
# For changes in the metadata
|
# For changes in the metadata
|
||||||
🫧 metadata:
|
🫧 metadata:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'icons/*.json'
|
- 'icons/*.json'
|
||||||
- categories/*
|
- categories/*
|
||||||
|
|
||||||
# For changes or added icons
|
# For changes or added icons
|
||||||
🎨 icon:
|
🎨 icon:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'icons/*.svg'
|
- 'icons/*.svg'
|
||||||
|
|
||||||
# For changes in the lucide package
|
# For changes in the lucide package
|
||||||
🧳 lucide package:
|
🧳 lucide package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide/*'
|
- 'packages/lucide/*'
|
||||||
|
|
||||||
# For changes in the lucide React package
|
# For changes in the lucide React package
|
||||||
⚛️ react package:
|
⚛️ react package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-react/*'
|
- 'packages/lucide-react/*'
|
||||||
|
|
||||||
# For changes in the lucide React Native package
|
# For changes in the lucide React Native package
|
||||||
⚛️ react native package:
|
⚛️ react native package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-react-native/*'
|
- 'packages/lucide-react-native/*'
|
||||||
|
|
||||||
# For changes in the lucide vue packages
|
# For changes in the lucide vue packages
|
||||||
💎 vue package:
|
💎 vue package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-vue/*'
|
- 'packages/lucide-vue/*'
|
||||||
- 'packages/lucide-vue-next/*'
|
- 'packages/lucide-vue-next/*'
|
||||||
|
|
||||||
# For changes in the lucide angular package
|
# For changes in the lucide angular package
|
||||||
🅰️ angular package:
|
🅰️ angular package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-angular/*'
|
- 'packages/lucide-angular/*'
|
||||||
|
|
||||||
# For changes in the lucide preact package
|
# For changes in the lucide preact package
|
||||||
⚛️ preact package:
|
⚛️ preact package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-preact/*'
|
- 'packages/lucide-preact/*'
|
||||||
|
|
||||||
# For changes in the lucide svelte package
|
# For changes in the lucide svelte package
|
||||||
🧣 svelte package:
|
🧣 svelte package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-svelte/*'
|
- 'packages/lucide-svelte/*'
|
||||||
|
|
||||||
# For changes in the lucide solid package
|
# For changes in the lucide solid package
|
||||||
🪝 solid package:
|
🪝 solid package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-solid/*'
|
- 'packages/lucide-solid/*'
|
||||||
|
|
||||||
# For changes in the lucide astro package
|
|
||||||
🚀 astro package:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file:
|
|
||||||
- 'packages/astro/*'
|
|
||||||
|
|
||||||
# For changes in the lucide static package
|
# For changes in the lucide static package
|
||||||
🪨 static package:
|
🪨 static package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-static/*'
|
- 'packages/lucide-static/*'
|
||||||
|
|
||||||
# For changes in the lucide flutter package
|
# For changes in the lucide flutter package
|
||||||
🏹 flutter package:
|
🏹 flutter package:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'packages/lucide-flutter/*'
|
- 'packages/lucide-flutter/*'
|
||||||
|
|||||||
30
.github/pull_request_template.md
vendored
30
.github/pull_request_template.md
vendored
@@ -1,18 +1,16 @@
|
|||||||
<!-- Thank you for contributing! -->
|
<!-- Thank you for contributing! -->
|
||||||
|
|
||||||
<!--
|
|
||||||
PR Title Guidelines:
|
|
||||||
|
|
||||||
Please use the format: <type>(<scope>): <short description>
|
|
||||||
|
|
||||||
Example: feat(icons): added `camera` icon
|
|
||||||
|
|
||||||
Available types: fix, feat, perf, docs, style, refactor, test, chore, ci, build
|
|
||||||
Common scopes: icons, docs, studio, site, dev
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Insert `closes #issueNumber` here if merging this PR will resolve an existing issue -->
|
<!-- Insert `closes #issueNumber` here if merging this PR will resolve an existing issue -->
|
||||||
## Description
|
|
||||||
|
## What is the purpose of this pull request?
|
||||||
|
<!-- Please choose one of the following, and put an "x" next to it. -->
|
||||||
|
- [ ] New Icon
|
||||||
|
- [ ] Bug fix
|
||||||
|
- [ ] New Feature
|
||||||
|
- [ ] Documentation update
|
||||||
|
- [ ] Other:
|
||||||
|
|
||||||
|
### Description
|
||||||
<!-- Please insert your description here and provide info about the "what" this PR is contribution -->
|
<!-- Please insert your description here and provide info about the "what" this PR is contribution -->
|
||||||
|
|
||||||
### Icon use case <!-- ONLY for new icons, remove this part if not icon PR -->
|
### Icon use case <!-- ONLY for new icons, remove this part if not icon PR -->
|
||||||
@@ -25,12 +23,10 @@ Common scopes: icons, docs, studio, site, dev
|
|||||||
|
|
||||||
### Concept <!-- ONLY for new icons -->
|
### Concept <!-- ONLY for new icons -->
|
||||||
<!-- All of these requirements must be fulfilled. -->
|
<!-- All of these requirements must be fulfilled. -->
|
||||||
<!-- IMPORTANT! Please read our official statement on brand logos in Lucide: -->
|
|
||||||
<!-- https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md -->
|
|
||||||
- [ ] I have provided valid use cases for each icon.
|
- [ ] I have provided valid use cases for each icon.
|
||||||
- [ ] I have [not added any brand or logo icon](https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md).
|
- [ ] I have not added any a brand or logo icon.
|
||||||
- [ ] I have not used any hate symbols.
|
- [ ] I have not used any hate symbols.
|
||||||
- [ ] I have not included any religious, war/violence related or political imagery.
|
- [ ] I have not included any religious or political imagery.
|
||||||
|
|
||||||
### Author, credits & license<!-- ONLY for new icons. -->
|
### Author, credits & license<!-- ONLY for new icons. -->
|
||||||
<!-- Please choose one of the following, and put an "x" next to it. -->
|
<!-- Please choose one of the following, and put an "x" next to it. -->
|
||||||
@@ -51,7 +47,7 @@ Common scopes: icons, docs, studio, site, dev
|
|||||||
- [ ] I've made sure that the icons look sharp on low DPI displays.
|
- [ ] I've made sure that the icons look sharp on low DPI displays.
|
||||||
- [ ] I've made sure that the icons look consistent with the icon set in size, optical volume and density.
|
- [ ] I've made sure that the icons look consistent with the icon set in size, optical volume and density.
|
||||||
- [ ] I've made sure that the icons are visually centered.
|
- [ ] I've made sure that the icons are visually centered.
|
||||||
- [ ] I've correctly optimized all icons to three points of precision.
|
- [ ] I've correctly optimized all icons to two points of precision.
|
||||||
|
|
||||||
## Before Submitting <!-- For every PR! -->
|
## Before Submitting <!-- For every PR! -->
|
||||||
<!-- All of these requirements must be fulfilled. -->
|
<!-- All of these requirements must be fulfilled. -->
|
||||||
|
|||||||
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@@ -7,24 +7,22 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- icons/**/*.svg
|
- icons/**/*.svg
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write # Required for OIDC
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
if: github.repository == 'lucide-icons/lucide' && startsWith(github.event.head_commit.message, 'feat(icons)')
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
VERSION: ${{ steps.new-version.outputs.NEW_VERSION }}
|
VERSION: ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -65,40 +63,8 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
|
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||||
name: Version ${{ steps.new-version.outputs.NEW_VERSION }}
|
name: New icons ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||||
generate_release_notes: true
|
body: ${{ steps.change-log.outputs.CHANGE_LOG }}
|
||||||
|
|
||||||
test-semantic-release:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Semantic Release
|
|
||||||
id: semantic
|
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
|
||||||
with:
|
|
||||||
tag_format: ${version}
|
|
||||||
branches: |
|
|
||||||
['new-release-workflow']
|
|
||||||
extends: |
|
|
||||||
semantic-release-monorepo
|
|
||||||
extra_plugins: |
|
|
||||||
@semantic-release/github
|
|
||||||
@semantic-release/git
|
|
||||||
@semantic-release/release-notes-generator
|
|
||||||
conventional-changelog-conventionalcommits
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Log output
|
|
||||||
if: steps.semantic.outputs.new_release_published == 'true'
|
|
||||||
run: |
|
|
||||||
echo ${{ steps.semantic.outputs.new_release_version }}
|
|
||||||
echo ${{ steps.semantic.outputs.new_release_major_version }}
|
|
||||||
echo ${{ steps.semantic.outputs.new_release_minor_version }}
|
|
||||||
echo ${{ steps.semantic.outputs.new_release_patch_version }}
|
|
||||||
|
|
||||||
start-release:
|
start-release:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
name: Close Issue with Banned Phrases
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: [opened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
block_phrases:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Check for blocked phrases in issue title
|
|
||||||
run: |
|
|
||||||
ISSUE_TITLE=$(jq -r '.issue.title' "$GITHUB_EVENT_PATH")
|
|
||||||
BLOCKED_PHRASES=("twitter" "whatsapp" "logo" "google" "tiktok" "facebook" "slack" "discord" "bluesky" "spotify" "behance" "pix" "x.com" "telegram")
|
|
||||||
|
|
||||||
# Check title and body for blocked phrases
|
|
||||||
for PHRASE in "${BLOCKED_PHRASES[@]}"
|
|
||||||
do
|
|
||||||
if echo "$ISSUE_TITLE" | grep -i "$PHRASE"; then
|
|
||||||
gh issue close ${{ github.event.issue.number }} --reason "not planned" --comment "This looks like a duplicate, use the [search](https://github.com/lucide-icons/lucide/issues?q=is%3Aissue+$PHRASE) to find similar issues.
|
|
||||||
|
|
||||||
Read [our official statement about brand logos in Lucide](https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md).
|
|
||||||
|
|
||||||
Always happy to help on [Discord](https://discord.gg/EH6nSts)."
|
|
||||||
gh issue lock ${{ github.event.issue.number }} --reason spam
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
5
.github/workflows/close-stale-prs.yml
vendored
5
.github/workflows/close-stale-prs.yml
vendored
@@ -1,13 +1,11 @@
|
|||||||
name: Close stale issues and PR
|
name: Close stale issues and PR
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '45 1 * * *'
|
- cron: "45 1 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v9
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
@@ -16,5 +14,4 @@ jobs:
|
|||||||
close-pr-message: This PR was closed because it has been stalled for 5 days with no activity.
|
close-pr-message: This PR was closed because it has been stalled for 5 days with no activity.
|
||||||
close-pr-label: 🧶 stale
|
close-pr-label: 🧶 stale
|
||||||
days-before-stale: 30
|
days-before-stale: 30
|
||||||
days-before-issue-stale: -1
|
|
||||||
days-before-close: -1
|
days-before-close: -1
|
||||||
|
|||||||
58
.github/workflows/comment-icon-preview.yml
vendored
58
.github/workflows/comment-icon-preview.yml
vendored
@@ -1,58 +0,0 @@
|
|||||||
name: Icon preview comment
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ['Pull request icon preview']
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: >
|
|
||||||
github.event.workflow_run.event == 'pull_request' &&
|
|
||||||
github.event.workflow_run.conclusion == 'success'
|
|
||||||
steps:
|
|
||||||
- name: 'Download artifact'
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
run_id: context.payload.workflow_run.id,
|
|
||||||
});
|
|
||||||
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
|
|
||||||
return artifact.name == "pr_number"
|
|
||||||
})[0];
|
|
||||||
let download = await github.rest.actions.downloadArtifact({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
artifact_id: matchArtifact.id,
|
|
||||||
archive_format: 'zip',
|
|
||||||
});
|
|
||||||
const fs = require('fs');
|
|
||||||
fs.writeFileSync('${{github.workspace}}/pr_number.zip', Buffer.from(download.data));
|
|
||||||
|
|
||||||
- name: 'Unzip artifact'
|
|
||||||
run: unzip pr_number.zip
|
|
||||||
|
|
||||||
- name: 'Get PR number'
|
|
||||||
run: echo "number=$(cat NR)" >> $GITHUB_OUTPUT
|
|
||||||
id: pr-number
|
|
||||||
|
|
||||||
- name: Find Comment
|
|
||||||
uses: peter-evans/find-comment@v2
|
|
||||||
id: pr-comment
|
|
||||||
with:
|
|
||||||
issue-number: ${{ steps.pr-number.outputs.number }}
|
|
||||||
comment-author: 'github-actions[bot]'
|
|
||||||
body-includes: Added or changed icons
|
|
||||||
|
|
||||||
- name: Create or update comment
|
|
||||||
uses: peter-evans/create-or-update-comment@v3
|
|
||||||
with:
|
|
||||||
comment-id: ${{ steps.pr-comment.outputs.comment-id }}
|
|
||||||
issue-number: ${{ steps.pr-number.outputs.number }}
|
|
||||||
body-path: comment-markup.md
|
|
||||||
edit-mode: replace
|
|
||||||
7
.github/workflows/labeler.yml
vendored
7
.github/workflows/labeler.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: 'Pull Request Labeler'
|
name: "Pull Request Labeler"
|
||||||
on:
|
on:
|
||||||
- pull_request_target
|
- pull_request_target
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
@@ -9,5 +9,4 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/labeler@v5
|
||||||
- uses: actions/labeler@v5
|
|
||||||
|
|||||||
32
.github/workflows/lint-pr-title.yml
vendored
32
.github/workflows/lint-pr-title.yml
vendored
@@ -1,32 +0,0 @@
|
|||||||
name: Linting PR
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- edited
|
|
||||||
- reopened
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint-pr-title:
|
|
||||||
name: PR Title Lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: amannn/action-semantic-pull-request@v5
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
types: |
|
|
||||||
fix
|
|
||||||
feat
|
|
||||||
perf
|
|
||||||
refactor
|
|
||||||
test
|
|
||||||
style
|
|
||||||
docs
|
|
||||||
ci
|
|
||||||
build
|
|
||||||
chore
|
|
||||||
requireScope: true
|
|
||||||
ignoreLabels: |
|
|
||||||
bot
|
|
||||||
39
.github/workflows/linting-icons.yml
vendored
39
.github/workflows/linting-icons.yml
vendored
@@ -1,39 +0,0 @@
|
|||||||
name: Linting Icons
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'icons/*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint-filenames:
|
|
||||||
name: Lint Filenames
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
- name: Get changed files
|
|
||||||
id: changed-files
|
|
||||||
uses: tj-actions/changed-files@v46
|
|
||||||
with:
|
|
||||||
files: icons/*
|
|
||||||
|
|
||||||
- name: Generate annotations
|
|
||||||
run: node ./scripts/lintFilenames.mts
|
|
||||||
env:
|
|
||||||
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
||||||
|
|
||||||
lint-aliases:
|
|
||||||
name: Check Uniqueness of Aliases
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- name: Check Uniqueness of Aliases
|
|
||||||
run: "! cat <(printf \"%s\\n\" icons/*.json | while read -r name; do basename \"$name\" .json; done) <(jq -cr 'select(.aliases) | .aliases[] | if type==\"string\" then . else .name end' icons/*.json) | sort | uniq -c | grep -ve '^\\s*1 '"
|
|
||||||
@@ -1,20 +1,22 @@
|
|||||||
name: Linting PR
|
name: Linting
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
branches:
|
||||||
- icons/*.svg
|
- '**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-code:
|
linting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
25
.github/workflows/lucide-angular.yml
vendored
25
.github/workflows/lucide-angular.yml
vendored
@@ -8,15 +8,17 @@ on:
|
|||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide-angular:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -24,18 +26,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-angular build
|
run: pnpm --filter lucide-angular build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-angular test
|
run: pnpm --filter lucide-angular test
|
||||||
|
|||||||
42
.github/workflows/lucide-astro.yml
vendored
42
.github/workflows/lucide-astro.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: Lucide Astro Checks
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/astro/**
|
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
|
||||||
- pnpm-lock.yaml
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
cache: 'pnpm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter @lucide/astro build
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
- uses: actions/setup-node@v3.8.1
|
|
||||||
with:
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
cache: 'pnpm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter @lucide/astro test
|
|
||||||
15
.github/workflows/lucide-font.yml
vendored
15
.github/workflows/lucide-font.yml
vendored
@@ -3,6 +3,7 @@ name: Lucide font checks
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- icons/**
|
||||||
- tools/build-font/**
|
- tools/build-font/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
@@ -10,12 +11,14 @@ jobs:
|
|||||||
lucide-font:
|
lucide-font:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -26,8 +29,8 @@ jobs:
|
|||||||
- name: Create font in ./lucide-font
|
- name: Create font in ./lucide-font
|
||||||
run: pnpm build:font
|
run: pnpm build:font
|
||||||
|
|
||||||
- name: 'Upload to Artifacts'
|
- name: "Upload to Artifacts"
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: lucide-font
|
name: lucide-font
|
||||||
path: lucide-font
|
path: lucide-font
|
||||||
|
|||||||
14
.github/workflows/lucide-preact.yml
vendored
14
.github/workflows/lucide-preact.yml
vendored
@@ -4,7 +4,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-preact/**
|
- packages/lucide-preact/**
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
- tools/build-icons/**
|
||||||
- tools/rollup-plugins/**
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
@@ -13,15 +12,20 @@ jobs:
|
|||||||
lucide-preact:
|
lucide-preact:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm --filter lucide-preact build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-preact test
|
run: pnpm --filter lucide-preact test
|
||||||
|
|||||||
26
.github/workflows/lucide-react-native.yml
vendored
26
.github/workflows/lucide-react-native.yml
vendored
@@ -4,21 +4,22 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-react-native/**
|
- packages/lucide-react-native/**
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
- tools/build-icons/**
|
||||||
- tools/rollup-plugins/**
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide-react-native:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -26,18 +27,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-react-native build
|
run: pnpm --filter lucide-react-native build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-react-native test
|
run: pnpm --filter lucide-react-native test
|
||||||
|
|||||||
26
.github/workflows/lucide-react.yml
vendored
26
.github/workflows/lucide-react.yml
vendored
@@ -4,22 +4,23 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-react/**
|
- packages/lucide-react/**
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
- tools/build-icons/**
|
||||||
- tools/rollup-plugins/**
|
- tools/rollup-plugins/**
|
||||||
- scripts/generateNextJSAliases.mjs
|
- scripts/generateNextJSAliases.mjs
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide-react:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -27,18 +28,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-react build
|
run: pnpm --filter lucide-react build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-react test
|
run: pnpm --filter lucide-react test
|
||||||
|
|||||||
24
.github/workflows/lucide-shared.yml
vendored
24
.github/workflows/lucide-shared.yml
vendored
@@ -1,24 +0,0 @@
|
|||||||
name: Lucide Shared Checks
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/shared/**
|
|
||||||
- pnpm-lock.yaml
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-react test
|
|
||||||
26
.github/workflows/lucide-solid.yml
vendored
26
.github/workflows/lucide-solid.yml
vendored
@@ -4,21 +4,22 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-solid/**
|
- packages/lucide-solid/**
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
- tools/build-icons/**
|
||||||
- tools/rollup-plugins/**
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide-solid:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -26,18 +27,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-solid build
|
run: pnpm --filter lucide-solid build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-solid test
|
run: pnpm --filter lucide-solid test
|
||||||
|
|||||||
10
.github/workflows/lucide-static.yml
vendored
10
.github/workflows/lucide-static.yml
vendored
@@ -11,12 +11,14 @@ jobs:
|
|||||||
lucide-static:
|
lucide-static:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|||||||
43
.github/workflows/lucide-svelte-5.yml
vendored
43
.github/workflows/lucide-svelte-5.yml
vendored
@@ -1,43 +0,0 @@
|
|||||||
name: Lucide Svelte 5 checks
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/svelte/**
|
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
|
||||||
- tools/rollup-plugins/**
|
|
||||||
- pnpm-lock.yaml
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter @lucide/svelte build
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter @lucide/svelte test
|
|
||||||
26
.github/workflows/lucide-svelte.yml
vendored
26
.github/workflows/lucide-svelte.yml
vendored
@@ -4,21 +4,22 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-svelte/**
|
- packages/lucide-svelte/**
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
- tools/build-icons/**
|
||||||
- tools/rollup-plugins/**
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide-svelte:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -26,18 +27,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-svelte build
|
run: pnpm --filter lucide-svelte build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-svelte test
|
run: pnpm --filter lucide-svelte test
|
||||||
|
|||||||
26
.github/workflows/lucide-vue-next.yml
vendored
26
.github/workflows/lucide-vue-next.yml
vendored
@@ -4,21 +4,22 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-vue-next/**
|
- packages/lucide-vue-next/**
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
- tools/build-icons/**
|
||||||
- tools/rollup-plugins/**
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide-vue-next:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -26,18 +27,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-vue-next build
|
run: pnpm --filter lucide-vue-next build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-vue-next test
|
run: pnpm --filter lucide-vue-next test
|
||||||
|
|||||||
26
.github/workflows/lucide-vue.yml
vendored
26
.github/workflows/lucide-vue.yml
vendored
@@ -4,40 +4,28 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-vue/**
|
- packages/lucide-vue/**
|
||||||
- packages/shared/**
|
|
||||||
- tools/build-icons/**
|
- tools/build-icons/**
|
||||||
- tools/rollup-plugins/**
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide-vue:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: 8
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter @lucide/vue build
|
run: pnpm --filter lucide-vue build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter @lucide/vue test
|
run: pnpm --filter lucide-vue test
|
||||||
|
|||||||
25
.github/workflows/lucide.yml
vendored
25
.github/workflows/lucide.yml
vendored
@@ -9,15 +9,17 @@ on:
|
|||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lucide:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -25,18 +27,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide build
|
run: pnpm --filter lucide build
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide test
|
run: pnpm --filter lucide test
|
||||||
|
|||||||
46
.github/workflows/pull-request-icon-preview.yml
vendored
46
.github/workflows/pull-request-icon-preview.yml
vendored
@@ -1,46 +0,0 @@
|
|||||||
name: Pull request icon preview
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'icons/*.svg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
generate-changed-icons-comment:
|
|
||||||
name: Generate Changed Icons Comment
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Get changed files
|
|
||||||
id: changed-files
|
|
||||||
uses: tj-actions/changed-files@v46
|
|
||||||
with:
|
|
||||||
files: icons/*.svg
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
- name: Install svgson for code preview (safer and faster than installing all deps)
|
|
||||||
run: npm install svgson@5.3.1 --force
|
|
||||||
|
|
||||||
- name: Save PR number
|
|
||||||
run: |
|
|
||||||
mkdir -p ./pr
|
|
||||||
echo ${{ github.event.number }} > ./pr/NR
|
|
||||||
|
|
||||||
- name: Generate comment markup
|
|
||||||
run: node ./scripts/generateChangedIconsCommentMarkup.mts >> ./pr/comment-markup.md
|
|
||||||
id: comment-markup
|
|
||||||
env:
|
|
||||||
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: pr_number
|
|
||||||
path: pr/
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
name: Pull request tags suggestions
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
paths:
|
|
||||||
- 'icons/*.json'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pull-request-tags-suggestions:
|
|
||||||
name: Pull Request Tags Suggestions
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# We checkout the main branch of main repository for security reasons.
|
|
||||||
# This is to prevent the workflow from running on a forked repository.
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
repository: lucide-icons/lucide
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
cache: 'pnpm'
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Generate comment markup
|
|
||||||
run: node ./scripts/suggestTags.mts
|
|
||||||
env:
|
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
||||||
PULL_REQUEST_NUMBER: ${{ github.event.number }}
|
|
||||||
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
109
.github/workflows/pull-request.yml
vendored
Normal file
109
.github/workflows/pull-request.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
name: Add Changed Icons comment
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
paths:
|
||||||
|
- 'icons/*.svg'
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- fix-icon-preview
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-filenames:
|
||||||
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v41
|
||||||
|
with:
|
||||||
|
files: icons/*
|
||||||
|
- name: Generate annotations
|
||||||
|
run: node ./scripts/lintFilenames.mjs
|
||||||
|
env:
|
||||||
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
|
||||||
|
lint-contributors:
|
||||||
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v41
|
||||||
|
with:
|
||||||
|
files: icons/*
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- name: Install simple-git (safer and faster than installing all deps)
|
||||||
|
run: npm install simple-git
|
||||||
|
- name: Generate annotations
|
||||||
|
run: node ./scripts/updateContributors.mjs
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
FETCH_DEPTH: ${{ github.event.pull_request.commits }}
|
||||||
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
- name: Generate annotations
|
||||||
|
env:
|
||||||
|
ANNOTATION_SEVERITY: notice
|
||||||
|
ANNOTATION_TITLE: Contributors have changed!
|
||||||
|
ANNOTATION_DESCRIPTION: Don't add people who have only performed automatic optimizations.
|
||||||
|
run: |
|
||||||
|
git diff --unified=0 -- icons/*.json | # diff icon metadata (unified=0 gives the correct chunk line number)
|
||||||
|
perl -ne '/^(\+|- |@)/ && print' | # get chunks (lines that start with "+++", "@@", "+ ", "- ")
|
||||||
|
perl -pe 's/\n/%0A/' | # url encode line breaks (\n -> %0A)
|
||||||
|
perl -pe 's/%0A(\+\+\+ b\/)/\n\1/g' | # split chunks(one chunk per line)
|
||||||
|
perl -pe "s/\+\+\+ b\/([^@]*)%0A@@ -(\d+)[^\s]* \+(\d+)[^@]*@@(.*)/::$ANNOTATION_SEVERITY file=\1,line=\2,endLine=\3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A\4/"
|
||||||
|
# Example for the previous substitution
|
||||||
|
# input: +++ b/icons/accessibility.json%0A@@ -2,0 +3 @@%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
|
||||||
|
# output: ::$ANNOTATION_SEVERITY file=icons/accessibility.json,line=2,endLine=3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
|
||||||
|
|
||||||
|
generate-changed-icons-comment:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v41
|
||||||
|
with:
|
||||||
|
files: icons/*.svg
|
||||||
|
|
||||||
|
- name: Find Comment
|
||||||
|
uses: peter-evans/find-comment@v2
|
||||||
|
id: pr-comment
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
comment-author: 'github-actions[bot]'
|
||||||
|
body-includes: Added or changed icons
|
||||||
|
|
||||||
|
- name: Generate comment markup
|
||||||
|
run: node ./scripts/generateChangedIconsCommentMarkup.mjs >> comment-markup.md
|
||||||
|
id: comment-markup
|
||||||
|
env:
|
||||||
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
|
||||||
|
- name: Create or update comment
|
||||||
|
uses: peter-evans/create-or-update-comment@v3
|
||||||
|
with:
|
||||||
|
comment-id: ${{ steps.pr-comment.outputs.comment-id }}
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
body-path: ./comment-markup.md
|
||||||
|
edit-mode: replace
|
||||||
91
.github/workflows/release.yml
vendored
91
.github/workflows/release.yml
vendored
@@ -18,13 +18,9 @@ on:
|
|||||||
description: Version
|
description: Version
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write # Required for OIDC
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-release:
|
pre-release:
|
||||||
if: github.repository == 'lucide-icons/lucide' && contains('["ericfennis", "karsa-mistmere", "jguddas"]', github.actor)
|
if: github.repository == 'lucide-icons/lucide' && contains('["ericfennis", "karsa-mistmere"]', github.actor)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
@@ -42,33 +38,29 @@ jobs:
|
|||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: pre-release
|
needs: pre-release
|
||||||
permissions:
|
|
||||||
id-token: write # Required for OIDC
|
|
||||||
contents: read
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
package:
|
package: [
|
||||||
[
|
'lucide',
|
||||||
'lucide',
|
'lucide-react',
|
||||||
'lucide-react',
|
'lucide-react-native',
|
||||||
'lucide-react-native',
|
'lucide-vue',
|
||||||
'lucide-vue-next',
|
'lucide-vue-next',
|
||||||
'lucide-angular',
|
'lucide-angular',
|
||||||
'lucide-preact',
|
'lucide-preact',
|
||||||
'lucide-solid',
|
'lucide-solid',
|
||||||
'lucide-svelte',
|
'lucide-svelte',
|
||||||
'@lucide/astro',
|
]
|
||||||
'@lucide/svelte',
|
|
||||||
'@lucide/vue',
|
|
||||||
]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -86,26 +78,22 @@ jobs:
|
|||||||
run: pnpm --filter ${{ matrix.package }} test
|
run: pnpm --filter ${{ matrix.package }} test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: pnpm --filter ${{ matrix.package }} publish --access public --no-git-checks --ignore-scripts
|
run: pnpm --filter ${{ matrix.package }} publish --no-git-checks --ignore-scripts
|
||||||
env:
|
|
||||||
NPM_CONFIG_PROVENANCE: true
|
|
||||||
|
|
||||||
lucide-static:
|
lucide-static:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [pre-release, lucide-font]
|
needs: [pre-release, lucide-font]
|
||||||
permissions:
|
|
||||||
id-token: write # Required for OIDC
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -124,20 +112,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: pnpm --filter lucide-static publish --no-git-checks
|
run: pnpm --filter lucide-static publish --no-git-checks
|
||||||
env:
|
|
||||||
NPM_CONFIG_PROVENANCE: true
|
|
||||||
|
|
||||||
lucide-font:
|
lucide-font:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: pre-release
|
needs: pre-release
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
node-version-file: 'package.json'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -148,8 +136,8 @@ jobs:
|
|||||||
- name: Create font in ./lucide-font
|
- name: Create font in ./lucide-font
|
||||||
run: pnpm build:font
|
run: pnpm build:font
|
||||||
|
|
||||||
- name: 'Upload to Artifacts'
|
- name: "Upload to Artifacts"
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: lucide-font
|
name: lucide-font
|
||||||
path: lucide-font
|
path: lucide-font
|
||||||
@@ -157,18 +145,21 @@ jobs:
|
|||||||
post-release:
|
post-release:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [pre-release, lucide-font]
|
needs: [
|
||||||
|
pre-release,
|
||||||
|
lucide-font,
|
||||||
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
- name: Zip font and icons
|
- name: Zip font and icons
|
||||||
run: |
|
run: |
|
||||||
zip -r lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip lucide-font
|
zip -r lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip lucide-font
|
||||||
zip -r lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip icons
|
zip -r lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip icons
|
||||||
|
|
||||||
- name: Release zip and fonts
|
- name: Release zip and fonts
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ needs.pre-release.outputs.VERSION }}
|
tag_name: ${{ needs.pre-release.outputs.VERSION }}
|
||||||
files: |
|
files: |
|
||||||
|
|||||||
33
.github/workflows/request-review.yml
vendored
33
.github/workflows/request-review.yml
vendored
@@ -1,33 +0,0 @@
|
|||||||
name: 'Request Review'
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [opened]
|
|
||||||
paths:
|
|
||||||
- icons/*.svg
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
request-review:
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
|
||||||
- name: Get changed files
|
|
||||||
id: changed-files
|
|
||||||
uses: tj-actions/changed-files@v41
|
|
||||||
with:
|
|
||||||
files: icons/*.svg
|
|
||||||
- run: |
|
|
||||||
while IFS= read -r file; do
|
|
||||||
jq -r '.contributors[]' "${file%.svg}.json"
|
|
||||||
done <<< "$CHANGED_FILES" | while read -r contributor; do
|
|
||||||
gh pr edit "${{ github.event.pull_request.number }}" --add-reviewer "$contributor" || true
|
|
||||||
done
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
||||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -4,7 +4,6 @@
|
|||||||
.obsidian
|
.obsidian
|
||||||
.now
|
.now
|
||||||
.idea
|
.idea
|
||||||
.env
|
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
@@ -17,17 +16,11 @@ outlined
|
|||||||
packages/**/src/icons/*.js
|
packages/**/src/icons/*.js
|
||||||
packages/**/src/icons/*.ts
|
packages/**/src/icons/*.ts
|
||||||
packages/**/src/icons/*.tsx
|
packages/**/src/icons/*.tsx
|
||||||
packages/**/src/aliases/*.ts
|
|
||||||
packages/**/src/aliases.ts
|
packages/**/src/aliases.ts
|
||||||
!packages/**/src/aliases/index.ts
|
|
||||||
packages/**/src/dynamicIconImports.ts
|
packages/**/src/dynamicIconImports.ts
|
||||||
packages/**/DynamicIcon.d.ts
|
|
||||||
packages/**/dynamicIconImports.js
|
packages/**/dynamicIconImports.js
|
||||||
packages/**/dynamicIconImports.d.ts
|
packages/**/dynamicIconImports.d.ts
|
||||||
packages/**/dynamicIconImports.js.map
|
packages/**/dynamicIconImports.js.map
|
||||||
packages/**/dynamic.d.ts
|
|
||||||
packages/**/dynamic.mjs.map
|
|
||||||
packages/**/dynamic.mjs
|
|
||||||
packages/**/LICENSE
|
packages/**/LICENSE
|
||||||
categories.json
|
categories.json
|
||||||
tags.json
|
tags.json
|
||||||
@@ -41,10 +34,7 @@ docs/.vitepress/data/iconNodes
|
|||||||
docs/.vitepress/data/iconMetaData.ts
|
docs/.vitepress/data/iconMetaData.ts
|
||||||
docs/.vitepress/data/releaseMetaData.json
|
docs/.vitepress/data/releaseMetaData.json
|
||||||
docs/.vitepress/data/releaseMetaData
|
docs/.vitepress/data/releaseMetaData
|
||||||
docs/.vitepress/data/categoriesData.json
|
|
||||||
docs/.vitepress/data/iconDetails
|
docs/.vitepress/data/iconDetails
|
||||||
docs/.vitepress/data/relatedIcons.json
|
docs/.vitepress/data/relatedIcons.json
|
||||||
docs/.vercel
|
docs/.vercel
|
||||||
docs/.nitro
|
docs/.nitro
|
||||||
.gitignore
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
|
||||||
# docs examples
|
|
||||||
docs/**/examples/
|
|
||||||
docs/.vitepress/.temp
|
|
||||||
docs/.vitepress/cache
|
|
||||||
docs/.vitepress/data
|
|
||||||
docs/.nitro
|
|
||||||
|
|
||||||
# lucide-angular
|
# lucide-angular
|
||||||
packages/lucide-angular/.angular/cache
|
packages/lucide-angular/.angular/cache
|
||||||
|
|
||||||
|
|||||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -12,4 +12,4 @@
|
|||||||
"webRoot": "${workspaceFolder}"
|
"webRoot": "${workspaceFolder}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
@@ -1,6 +1,13 @@
|
|||||||
{
|
{
|
||||||
"cSpell.words": ["devs", "preact", "Preact"],
|
"cSpell.words": [
|
||||||
|
"devs",
|
||||||
|
"preact",
|
||||||
|
"Preact"
|
||||||
|
],
|
||||||
"eslint.enable": true,
|
"eslint.enable": true,
|
||||||
"eslint.validate": ["javascript", "svg"],
|
"eslint.validate": [
|
||||||
"svg.preview.background": "editor"
|
"javascript",
|
||||||
|
"svg"
|
||||||
|
],
|
||||||
|
"svg.preview.background": "transparent"
|
||||||
}
|
}
|
||||||
|
|||||||
13
.vscode/svg.code-snippets
vendored
13
.vscode/svg.code-snippets
vendored
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/Yash-Singh1/vscode-snippets-json-schema/main/schema.json",
|
|
||||||
"Lucide SVG": {
|
"Lucide SVG": {
|
||||||
"scope": "xml",
|
"scope": "xml",
|
||||||
"description": "Base SVG with Lucide attributes.",
|
"description": "Base SVG with Lucide attributes.",
|
||||||
@@ -50,17 +49,7 @@
|
|||||||
"circle",
|
"circle",
|
||||||
"<circle"
|
"<circle"
|
||||||
],
|
],
|
||||||
"body": "<circle cx=\"${2:12}\" cy=\"${3:$2}\" r=\"${1|10,2,.5\" fill=\"currentColor|}\" />"
|
"body": "<circle cx=\"${2:12}\" cy=\"${3:$2}\" r=\"${1|10,2,.5|}\" />"
|
||||||
},
|
|
||||||
"Squircle": {
|
|
||||||
"scope": "xml",
|
|
||||||
"description": "SVG `path` with Lucide defaults.",
|
|
||||||
"prefix": [
|
|
||||||
"squircle",
|
|
||||||
"path",
|
|
||||||
"<path"
|
|
||||||
],
|
|
||||||
"body": "<path d=\"M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9\" />"
|
|
||||||
},
|
},
|
||||||
"Ellipse": {
|
"Ellipse": {
|
||||||
"scope": "xml",
|
"scope": "xml",
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
# Our Official Stance on Including Brand Logos in Lucide
|
|
||||||
|
|
||||||
## TL;DR
|
|
||||||
|
|
||||||
Lucide **does not accept** brand logos, and we do not plan to add them in the future.
|
|
||||||
|
|
||||||
This is due to a combination of **legal restrictions**, **design consistency concerns**, and **practical maintenance reasons**.
|
|
||||||
|
|
||||||
If you need brand logos, we recommend [Simple Icons](https://simpleicons.org/), which provides an extensive, legally safer collection of brand marks.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 1. Historical Context
|
|
||||||
|
|
||||||
This is not a new debate — other icon sets have gone through the same discussion:
|
|
||||||
|
|
||||||
- **Material Design Icons** [deprecated all brand icons](https://github.com/Templarian/MaterialDesign/issues/6602) because they didn't fit the style, didn't work well in one color, and often looked out of place in a 24×24px grid.
|
|
||||||
- **Feather Icons** [came to the same conclusion](https://github.com/feathericons/feather/issues/763): brand logos have their own style, and forcing them into another inevitably leads to aesthetic compromises.
|
|
||||||
- **Lucide** learned from these examples — we'd rather focus on making a consistent set of non-brand icons that all work together.
|
|
||||||
|
|
||||||
## 2. Legal Considerations
|
|
||||||
|
|
||||||
Most brand logos:
|
|
||||||
- Are **protected by trademark or copyright**.
|
|
||||||
- Have **strict rules** for how they can be used (colors, spacing, proportions, etc.).
|
|
||||||
- **Don't allow modification** — but we'd have to change them to fit Lucide's style.
|
|
||||||
|
|
||||||
This means adding them could:
|
|
||||||
1. Break copyright or trademark law.
|
|
||||||
2. Make both you and the Lucide project legally responsible.
|
|
||||||
3. Force us to review every new request one by one for legal issues — something we simply can't do.
|
|
||||||
|
|
||||||
> **Note:** Simple Icons avoids this by keeping logos exactly as the brand provides them — though even they sometimes face [legal challenges](https://github.com/simple-icons/simple-icons/issues/11236).
|
|
||||||
|
|
||||||
## 3. Design & Consistency
|
|
||||||
|
|
||||||
Lucide is all about **visual consistency**.
|
|
||||||
|
|
||||||
Adding brand logos would:
|
|
||||||
- Break [our own design rules](https://lucide.dev/guide/design/icon-design-guide#icon-design-principles) for shapes, proportions, and stroke.
|
|
||||||
- Mix two fundamentally different categories of graphics (pictograms vs. corporate logos).
|
|
||||||
- Create a library where a subset of icons will always look "out of place".
|
|
||||||
|
|
||||||
If the logos are not in Lucide's style, why include them in Lucide at all? Better to use them from a dedicated brand icon source.
|
|
||||||
|
|
||||||
## 4. Maintenance Burden
|
|
||||||
|
|
||||||
Even with our current **"no brand icon requests"** policy, people still request them regularly.
|
|
||||||
|
|
||||||
Having any brand icons in the set:
|
|
||||||
- Makes people think we might add more in the future.
|
|
||||||
- Leads to repeated requests and the same conversations over and over.
|
|
||||||
- Wastes maintainer time redirecting people to the same explanation.
|
|
||||||
|
|
||||||
Removing them entirely solves this problem.
|
|
||||||
|
|
||||||
## 5. Recommended Alternatives
|
|
||||||
|
|
||||||
If you need brand icons, try:
|
|
||||||
- [Simple Icons](https://simpleicons.org/): offers a huge range of brands, in consistent SVG format, using a 24×24 viewBox, the same as ours.
|
|
||||||
- Official brand asset pages: most major companies provide downloadable SVGs.
|
|
||||||
|
|
||||||
You can use these alongside Lucide without bloating our core library.
|
|
||||||
|
|
||||||
## Final Words
|
|
||||||
|
|
||||||
Lucide is an **icon** set, not a **logo** set.
|
|
||||||
|
|
||||||
Logos belong in dedicated logo resources.
|
|
||||||
|
|
||||||
We're focusing on what Lucide does best: providing a clean, cohesive, and legally safe collection of open-source icons.
|
|
||||||
@@ -16,10 +16,10 @@ Guidelines for pull requests:
|
|||||||
|
|
||||||
- __Make your commit messages as descriptive as possible.__ Include as much information as you can. Explain anything that the file diffs themselves won’t make apparent.
|
- __Make your commit messages as descriptive as possible.__ Include as much information as you can. Explain anything that the file diffs themselves won’t make apparent.
|
||||||
- __Document your pull request__. Explain your fix, link to the relevant issue, add screenshots when adding new icons.
|
- __Document your pull request__. Explain your fix, link to the relevant issue, add screenshots when adding new icons.
|
||||||
- __Make sure the target of your pull request is the relevant branch__. Most of bug fixes or new feature should go to the `main` branch.
|
- __Make sure the target of your pull request is the relevant branch__. Most of bugfix or new feature should go to the `main` branch.
|
||||||
- __Include only related work__. If your pull request has unrelated commits, it won't be accepted.
|
- __Include only related work__. If your pull request has unrelated commit, it won't be accepted.
|
||||||
|
|
||||||
### Icon Pull Requests
|
### Pull Requests Including Icons
|
||||||
|
|
||||||
#### Guidelines
|
#### Guidelines
|
||||||
|
|
||||||
@@ -27,30 +27,24 @@ Please make sure you follow the icon guidelines, that should be followed to keep
|
|||||||
|
|
||||||
Read it here: [ICON_GUIDELINES](https://lucide.dev/docs/icon-design-guide).
|
Read it here: [ICON_GUIDELINES](https://lucide.dev/docs/icon-design-guide).
|
||||||
|
|
||||||
#### Lucide Studio
|
### Editor guides
|
||||||
|
|
||||||
For formatting and adjusting SVG icons, [@jguddas](https://github.com/jguddas) made a great tool called [Lucide Studio](https://studio.lucide.dev/). It is a web-based SVG editor that allows you to edit and adjust icons in the Lucide style. You can use it to create new icons or modify existing ones.
|
|
||||||
|
|
||||||
#### Editor guides
|
|
||||||
|
|
||||||
Here you can find instructions on how to implement the guidelines with different vector graphics editors:
|
Here you can find instructions on how to implement the guidelines with different vector graphics editors:
|
||||||
|
|
||||||
##### [Adobe Illustrator Guide](https://lucide.dev/docs/illustrator-guide)
|
#### [Adobe Illustrator Guide](https://lucide.dev/docs/illustrator-guide)
|
||||||
|
|
||||||
You can also [download an Adobe Illustrator template](https://github.com/lucide-icons/lucide/blob/main/docs/public/templates/illustrator_template.ai).
|
You can also [download an Adobe Illustrator template](https://github.com/lucide-icons/lucide/blob/main/docs/public/templates/illustrator_template.ai).
|
||||||
|
|
||||||
##### [Inkscape Guide](https://lucide.dev/docs/inkscape-guide)
|
#### [Inkscape Guide](https://lucide.dev/docs/inkscape-guide)
|
||||||
|
|
||||||
##### [Figma Guide](https://lucide.dev/docs/figma-guide)
|
#### [Figma Guide](https://lucide.dev/docs/figma-guide)
|
||||||
|
|
||||||
##### [Affinity Designer Guide](https://lucide.dev/guide/design/affinity-designer-guide)
|
### Submitting Multiple Icons
|
||||||
|
|
||||||
#### Submitting Multiple Icons
|
If you want submit multiple icons, please separate the icons and group them. That makes reviewing the icons easier and keep the thread clean and scoped.
|
||||||
|
So don't submit multiple icons in one PR that have noting to do with each other.
|
||||||
If you want to submit multiple icons, please separate the icons and group them. That makes reviewing the icons easier and keeps the thread clean and scoped.
|
|
||||||
So don't submit multiple icons in one PR that have nothing to do with each other.
|
|
||||||
So for example don't create one PR with icons: `arrow-up`, `bicycle`, `arrow-down`.
|
So for example don't create one PR with icons: `arrow-up`, `bicycle`, `arrow-down`.
|
||||||
Separate them into two PRs; 'pr-01' `arrow`, `arrow-down` and 'pr-02' `bicycle`.
|
Seperate them by two PRs; 'pr-01' `arrow`, `arrow-down` and 'pr-02' `bicycle`.
|
||||||
|
|
||||||
## Icon Requests
|
## Icon Requests
|
||||||
|
|
||||||
@@ -76,12 +70,12 @@ pnpm install # Install dependencies, including the workspace packages
|
|||||||
|
|
||||||
### Packages -> PNPM Workspaces
|
### Packages -> PNPM Workspaces
|
||||||
|
|
||||||
To distribute different packages we use [PNPM workspaces](https://pnpm.io/workspaces). Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces).
|
To distribute different packages we use PNPM workspaces. Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/lang/enhttps://lucide.dev/docs/workspaces).
|
||||||
|
|
||||||
The configured directory for workspaces is the [packages](https://github.com/lucide-icons/lucide/tree/main/packages) directory, located in the root directory. There you will find all the current packages from lucide.
|
The configured directory for workspaces is the [packages](https://github.com/lucide-icons/lucide/tree/main/packages) directory, located in the root directory. There you will find all the current packages from lucide.
|
||||||
There are more workspaces defined, see [`pnpm-workspace.yaml`](https://github.com/lucide-icons/lucide/blob/main/pnpm-workspace.yaml).
|
There are more workspaces defined, see [`pnpm-workspace.yaml`](https://github.com/lucide-icons/lucide/blob/main/pnpm-workspace.yaml).
|
||||||
|
|
||||||
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and uses pub for publishing.
|
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
|
||||||
|
|
||||||
### Generated Code
|
### Generated Code
|
||||||
|
|
||||||
@@ -131,7 +125,7 @@ When adding new features to for example the icon component for a framework. It i
|
|||||||
|
|
||||||
### Local Testing
|
### Local Testing
|
||||||
|
|
||||||
To test changes in a local project, you can use `yarn link`, `npm link`, `bun link` or `pnpm link` to link the package. Before you do this make sure you've built the package first.
|
To test changes in a local project, you can use `yarn link`, `npm link` or `pnpm link` to link the package. Before you do this make sure you builded the package first.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# in packages/lucide-react
|
# in packages/lucide-react
|
||||||
@@ -161,30 +155,6 @@ lucide
|
|||||||
|
|
||||||
The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory.
|
The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory.
|
||||||
|
|
||||||
#### Running the Docs Website Locally
|
|
||||||
|
|
||||||
To test the docs website locally, follow these steps:
|
|
||||||
|
|
||||||
1. **Navigate to the docs directory**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd docs
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Start the Local Development Server**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pnpm run docs:dev
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Open the Website Locally**
|
|
||||||
|
|
||||||
Vitepress should open with the following format:
|
|
||||||
|
|
||||||
VitePress dev server is running at:
|
|
||||||
- **Local**: `http://localhost:3000/`
|
|
||||||
- **Network**: `http://192.168.x.x:3000/`
|
|
||||||
|
|
||||||
### Guides
|
### Guides
|
||||||
|
|
||||||
Detailed documentation about: installation, guides, packages, design guides etc.
|
Detailed documentation about: installation, guides, packages, design guides etc.
|
||||||
@@ -193,13 +163,15 @@ Detailed documentation about: installation, guides, packages, design guides etc.
|
|||||||
|
|
||||||
All the icons of lucide in SVG format. These will be used as source for all the packages and other distributions for the lucide icons.
|
All the icons of lucide in SVG format. These will be used as source for all the packages and other distributions for the lucide icons.
|
||||||
|
|
||||||
### Packages
|
### packages
|
||||||
|
|
||||||
Includes all the (npm) packages of lucide.
|
Includes all the (npm) packages of lucide.
|
||||||
|
|
||||||
### Scripts
|
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
|
||||||
|
|
||||||
Includes useful scripts to automate certain jobs. Big part of the scripts is the template generation, for example it generates icon components for all the packages. These scripts are usually executed from the "scripts" section in the package.json.
|
### scripts
|
||||||
|
|
||||||
|
Includes usefully scripts to automate certain jobs. Big part of the scripts is the template generation, for example it generates icon components for all the packages. These scripts are usually executed from the "scripts" section in the package.json.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
@@ -216,4 +188,4 @@ If you need any help or have problems with you contribution. Please don't hesita
|
|||||||
Thank you to all the people who already contributed to Lucide!
|
Thank you to all the people who already contributed to Lucide!
|
||||||
|
|
||||||
<a href="https://github.com/lucide-icons/lucide/graphs/contributors">
|
<a href="https://github.com/lucide-icons/lucide/graphs/contributors">
|
||||||
<img src="https://opencollective.com/lucide-icons/contributors.svg?width=800" /></a>
|
<img src="https://opencollective.com/lucide-icons/contributors.svg?width=890" /></a>
|
||||||
|
|||||||
26
LICENSE
26
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
ISC License
|
ISC License
|
||||||
|
|
||||||
Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -13,27 +13,3 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
The MIT License (MIT) (for portions derived from Feather)
|
|
||||||
|
|
||||||
Copyright (c) 2013-2023 Cole Bemis
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|||||||
286
README.md
286
README.md
@@ -1,47 +1,185 @@
|
|||||||
<p align="center">
|
<p align=center><img width="480" src="https://lucide.dev/lucide-logo-repo.svg" alt="Lucide Logo"></p>
|
||||||
<a href="https://github.com/lucide-icons/lucide#gh-light-mode-only">
|
|
||||||
<img src="https://lucide.dev/lucide-logo-repo.svg#gh-light-mode-only" alt="Lucide - Beautiful & consistent icon toolkit made by the community. Open-source project and a fork of Feather Icons." width="480">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/lucide-icons/lucide#gh-dark-mode-only">
|
|
||||||
<img src="https://lucide.dev/lucide-logo-repo-dark.svg#gh-dark-mode-only" alt="Lucide - Beautiful & consistent icon toolkit made by the community. Open-source project and a fork of Feather Icons." width="480">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/lucide-icons/lucide/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/lucide" alt="license"></a>
|
<a href="https://github.com/lucide-icons/lucide/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/lucide" alt="license"></a>
|
||||||
<a href="https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons"><img src="https://img.shields.io/badge/Figma-F24E1E?logo=figma&logoColor=white" alt="figma installs"></a>
|
<a href="https://www.npmjs.com/package/lucide"><img src="https://img.shields.io/npm/v/lucide" alt="npm package"></a>
|
||||||
|
<a href="https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons"><img src="https://img.shields.io/endpoint?logo=figma&label=installs&url=https://yuanqing.github.io/figma-plugins-stats/plugin/939567362549682242/installs.json" alt="figma installs"></a>
|
||||||
<a href="https://github.com/lucide-icons/lucide/actions/workflows/release.yml"><img src="https://github.com/lucide-icons/lucide/actions/workflows/release.yml/badge.svg" alt="build status"></a>
|
<a href="https://github.com/lucide-icons/lucide/actions/workflows/release.yml"><img src="https://github.com/lucide-icons/lucide/actions/workflows/release.yml/badge.svg" alt="build status"></a>
|
||||||
<a href="https://discord.gg/EH6nSts"><img src="https://img.shields.io/discord/723074157486800936?label=chat&logo=discord&logoColor=%23ffffff&colorB=%237289DA" alt="discord chat"></a>
|
<a href="https://discord.gg/EH6nSts"><img src="https://img.shields.io/discord/723074157486800936?label=chat&logo=discord&logoColor=%23ffffff&colorB=%237289DA" alt="discord chat"></a>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">
|
|
||||||
<a href="https://lucide.dev/icons/">Icons</a>
|
|
||||||
·
|
|
||||||
<a href="https://lucide.dev/guide/">Guide</a>
|
|
||||||
·
|
|
||||||
<a href="https://lucide.dev/packages">Packages</a>
|
|
||||||
·
|
|
||||||
<a href="https://lucide.dev/license">License</a>
|
|
||||||
·
|
|
||||||
<a href="https://lucide.dev/showcase">Showcase</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# Lucide
|
# Lucide
|
||||||
|
|
||||||
Lucide is an open-source icon library that provides 1000+ vector (svg) files for displaying icons and symbols in digital and non-digital projects. The library aims to make it easier for designers and developers to incorporate icons into their projects by providing several official [packages](https://lucide.dev/packages) to make it easier to use these icons in your project.
|
Community-run fork of [Feather Icons](https://github.com/feathericons/feather), open for anyone to contribute icons.
|
||||||
|
|
||||||
## Packages
|
It began after growing dissatisfaction with the [Feather Icons](https://github.com/feathericons/feather) project moderation. With over 300+ open issues and over 100+ open PRs, the Feather Icons project has been abandoned. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted.
|
||||||
|
|
||||||
| Logo | Package | Version | Downloads | Links |
|
Lucide is trying to expand the icon set as much as possible while staying faithful to the original simplistic design language. We do this as a community of devs and designers and hope that you'll join us!
|
||||||
| ---- | ------- | ------- | --------- | ----- |
|
|
||||||
| <img src="https://lucide.dev/framework-logos/js.svg" alt="JS logo" width="48"> | **`lucide`** | [](https://www.npmjs.com/package/lucide) |  | [Docs](https://lucide.dev/guide/packages/lucide) · [Source](./packages/lucide) |
|
### Why choose Lucide over Feather Icons
|
||||||
| <img src="https://lucide.dev/framework-logos/react.svg" alt="React logo" width="48"> | **`lucide-react`** | [](https://www.npmjs.com/package/lucide-react) |  | [Docs](https://lucide.dev/guide/packages/lucide-react) · [Source](./packages/lucide-react) |
|
|
||||||
| <img src="https://lucide.dev/framework-logos/vue.svg" alt="Vue logo" width="48"> | **`lucide-vue-next`** | [](https://www.npmjs.com/package/lucide-vue-next) |  | [Docs](https://lucide.dev/guide/packages/lucide-vue-next) · [Source](./packages/lucide-vue-next) |
|
- More icons to work with: Lucide already has hundreds of icons more than Feather does.
|
||||||
| <img src="https://lucide.dev/framework-logos/svelte.svg" alt="Svelte logo" width="48"> | **`lucide-svelte`** | [](https://www.npmjs.com/package/lucide-svelte) |  | [Docs](https://lucide.dev/guide/packages/lucide-svelte) · [Source](./packages/lucide-svelte) |
|
- Official libraries and integrations with popular frameworks and design tools.
|
||||||
| <img src="https://lucide.dev/framework-logos/solid.svg" alt="Solid logo" width="48"> | **`lucide-solid`** | [](https://www.npmjs.com/package/lucide-solid) |  | [Docs](https://lucide.dev/guide/packages/lucide-solid) · [Source](./packages/lucide-solid) |
|
- Well maintained code base.
|
||||||
| <img src="https://lucide.dev/framework-logos/preact.svg" alt="Preact logo" width="48"> | **`lucide-preact`** | [](https://www.npmjs.com/package/lucide-preact) |  | [Docs](https://lucide.dev/guide/packages/lucide-preact) · [Source](./packages/lucide-preact) |
|
- Active community, regularly growing and improving the set.
|
||||||
| <img src="https://lucide.dev/framework-logos/react-native.svg" alt="React Native logo" width="48"> | **`lucide-react-native`** | [](https://www.npmjs.com/package/lucide-react-native) |  | [Docs](https://lucide.dev/guide/packages/lucide-react-native) · [Source](./packages/lucide-react-native) |
|
|
||||||
| <img src="https://lucide.dev/framework-logos/angular.svg" alt="Angular logo" width="48"> | **`lucide-angular`** | [](https://www.npmjs.com/package/lucide-angular) |  | [Docs](https://lucide.dev/guide/packages/lucide-angular) · [Source](./packages/lucide-angular) |
|
## Table of Contents
|
||||||
| <img src="https://lucide.dev/framework-logos/astro.svg" alt="Astro logo" width="48"> | **`@lucide/astro`** | [](https://www.npmjs.com/package/@lucide/astro) |  | [Docs](https://lucide.dev/guide/packages/lucide-astro) · [Source](./packages/astro) |
|
|
||||||
| <img src="https://lucide.dev/framework-logos/svg.svg" alt="SVG logo" width="48"> | **`lucide-static`** | [](https://www.npmjs.com/package/lucide-static) |  | [Docs](https://lucide.dev/guide/packages/lucide-static) · [Source](./packages/lucide-static) |
|
- [Usage](#usage)
|
||||||
|
- [Web](#web)
|
||||||
|
- [React](#react)
|
||||||
|
- [React Native](#react-native)
|
||||||
|
- [Vue 2](#vue-2)
|
||||||
|
- [Vue 3](#vue-3)
|
||||||
|
- [Angular](#angular)
|
||||||
|
- [Preact](#preact)
|
||||||
|
- [Static (svg sprite, font, icons ..)](#static-svg-sprite-font-icons-)
|
||||||
|
- [Figma](#figma)
|
||||||
|
- [Laravel](#laravel)
|
||||||
|
- [Svelte](#svelte)
|
||||||
|
- [Solid](#solid)
|
||||||
|
- [Hyva](#hyva)
|
||||||
|
- [Eleventy](#eleventy)
|
||||||
|
- [Contributing](#contributing)
|
||||||
|
- [Community](#community)
|
||||||
|
- [License](#license)
|
||||||
|
- [Credits](#credits)
|
||||||
|
- [Sponsors](#sponsors)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
At its core, Lucide is a collection of [SVG](https://svgontheweb.com/#svg) files. This means that you can use Lucide icons in all the same ways you can use SVGs (e.g. `img`, `background-image`, `inline`, `object`, `embed`, `iframe`). Here's a helpful article detailing the many ways SVGs can be used on the web: [SVG on the Web – Implementation Options](https://svgontheweb.com/#implementation)
|
||||||
|
|
||||||
|
The following are additional ways you can use Lucide.
|
||||||
|
With the Javascript library you can easily incorporate the icon you want in your webpage.
|
||||||
|
|
||||||
|
### Web
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for web applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide#lucide).
|
||||||
|
|
||||||
|
### React
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for react applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-react
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-react
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-react#lucide-react).
|
||||||
|
|
||||||
|
### React Native
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for React Native applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-react-native
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-react-native
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-react-native#lucide-react-native).
|
||||||
|
|
||||||
|
### Vue 2
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for vue applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-vue
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-vue
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-vue#lucide-vue).
|
||||||
|
|
||||||
|
### Vue 3
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for vue applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-vue-next
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-vue-next
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-vue-next#lucide-vue-next).
|
||||||
|
|
||||||
|
### Angular
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-angular
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-angular
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-angular#lucide-angular).
|
||||||
|
|
||||||
|
### Preact
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for preact applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-preact
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-preact
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-preact#lucide-preact).
|
||||||
|
|
||||||
|
### Static (svg sprite, font, icons ..)
|
||||||
|
|
||||||
|
Assets:
|
||||||
|
[Font Files](https://github.com/lucide-icons/lucide/releases/latest)
|
||||||
|
[SVG Files](https://github.com/lucide-icons/lucide/releases/latest)
|
||||||
|
[SVG Sprite](https://cdn.jsdelivr.net/npm/lucide-static@latest/sprite.svg)
|
||||||
|
|
||||||
|
NPM package
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-static
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-static
|
||||||
|
```
|
||||||
|
|
||||||
### Figma
|
### Figma
|
||||||
|
|
||||||
@@ -51,44 +189,94 @@ Visit [Figma community page](https://www.figma.com/community/plugin/939567362549
|
|||||||
|
|
||||||
<img width="420" src="https://www.figma.com/community/plugin/939567362549682242/thumbnail" alt="Figma Lucide Cover">
|
<img width="420" src="https://www.figma.com/community/plugin/939567362549682242/thumbnail" alt="Figma Lucide Cover">
|
||||||
|
|
||||||
|
### Laravel
|
||||||
|
|
||||||
|
Implementation of Lucide icon's using `blade-icons` for Laravel based projects.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
composer require mallardduck/blade-lucide-icons
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/mallardduck/blade-lucide-icons/blob/main/README.md).
|
||||||
|
|
||||||
|
### Svelte
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for Svelte applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-svelte
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-svelte
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-svelte#lucide-svelte).
|
||||||
|
|
||||||
|
### Solid
|
||||||
|
|
||||||
|
Implementation of the lucide icon library for solid applications.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add lucide-solid
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install lucide-solid
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-solid#lucide-solid).
|
||||||
|
|
||||||
|
### Hyva
|
||||||
|
|
||||||
|
Implementation of Lucide icon's using Hyvä's svg php viewmodal to render icons for Magento 2 Hyva theme based projects.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
composer require siteation/magento2-hyva-icons-lucide
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/Siteation/magento2-hyva-icons-lucide/blob/main/README.md).
|
||||||
|
|
||||||
|
### Eleventy
|
||||||
|
|
||||||
|
Using this plugin, Eleventy projects can incorporate Lucide icons. it makes it simple to use Lucide icons into your themes via shortcodes, improving your website's overall usability and visual appeal.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install @grimlink/eleventy-plugin-lucide-icons
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the [documentation](https://github.com/GrimLink/eleventy-plugin-lucide-icons/blob/main/README.md).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
|
For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
|
||||||
|
|
||||||
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/lucide-icons/lucide/blob/main/README.md)
|
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/lucide-icons/lucide/blob/main/README.md)
|
||||||
|
|
||||||
## About brand logos
|
|
||||||
|
|
||||||
Lucide **does not accept** brand logos, and we do not plan to add them in the future. This is due to a combination of **legal restrictions**, **design consistency concerns**, and **practical maintenance reasons**.
|
|
||||||
|
|
||||||
[Click here to read our official statement about brand logos in Lucide.](./BRAND_LOGOS_STATEMENT.md)
|
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
||||||
Join the community on our [Discord](https://discord.gg/EH6nSts) server!
|
Join the community on our [Discord](https://discord.gg/EH6nSts) server!
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Lucide is totally free for commercial use and personal use, this software is licensed under the [ISC License](https://github.com/lucide-icons/lucide/blob/main/LICENSE).
|
Lucide is totally free for commercial use and personally use, this software is licensed under the [ISC License](https://github.com/lucide-icons/lucide/blob/main/LICENSE).
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
Thank you to all the people who contributed to Lucide!
|
Thank you to all the people who contributed to Lucide!
|
||||||
|
|
||||||
<a href="https://github.com/lucide-icons/lucide/graphs/contributors">
|
<a href="https://github.com/lucide-icons/lucide/graphs/contributors">
|
||||||
|
<img src="https://opencollective.com/lucide-icons/contributors.svg?width=890" /></a>
|
||||||
<img src="https://opencollective.com/lucide-icons/contributors.svg?width=800" />
|
|
||||||
</a>
|
|
||||||
|
|
||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
|
|
||||||
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss">
|
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss">
|
||||||
<img src="docs/public/vercel.svg" alt="Powered by Vercel" width="200" />
|
<img src="docs/public/vercel.svg" alt="Powered by Vercel" width="200" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://www.digitalocean.com/?refcode=b0877a2caebd&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="docs/public/digitalocean.svg" width="200" alt="DigitalOcean Referral Badge" /></a>
|
<a href="https://www.digitalocean.com/?refcode=b0877a2caebd&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="docs/public/digitalocean.svg" width="200" alt="DigitalOcean Referral Badge" /></a>
|
||||||
|
|
||||||
### Awesome backers 🍺
|
|
||||||
|
|
||||||
<a href="https://github.com/pdfme/pdfme"><img src="docs/public/sponsors/pdfme.svg" width="180" alt="pdfme sponsor badge" /></a>
|
|
||||||
<a href="https://www.fina.money/"><img src="docs/public/sponsors/fina-money.png" width="180" alt="Fina Money sponsor badge" /></a>
|
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Accessibility",
|
"title": "Accessibility",
|
||||||
"icon": "accessibility"
|
"icon": "accessibility"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Accounts & access",
|
"title": "Accounts & access",
|
||||||
"icon": "user"
|
"icon": "user"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Animals",
|
"title": "Animals",
|
||||||
"icon": "dog"
|
"icon": "dog"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Arrows",
|
"title": "Arrows",
|
||||||
"icon": "arrow-left-right"
|
"icon": "arrow-left-right"
|
||||||
}
|
}
|
||||||
5
categories/brands.json
Normal file
5
categories/brands.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../category.schema.json",
|
||||||
|
"title": "Brands",
|
||||||
|
"icon": "facebook"
|
||||||
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Buildings",
|
"title": "Buildings",
|
||||||
"icon": "building"
|
"icon": "building"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Charts",
|
"title": "Charts",
|
||||||
"icon": "chart-pie"
|
"icon": "pie-chart"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Communication",
|
"title": "Communication",
|
||||||
"icon": "message-circle"
|
"icon": "message-circle"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Connectivity",
|
"title": "Connectivity",
|
||||||
"icon": "wifi"
|
"icon": "wifi"
|
||||||
}
|
}
|
||||||
5
categories/currency.json
Normal file
5
categories/currency.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../category.schema.json",
|
||||||
|
"title": "Currency",
|
||||||
|
"icon": "dollar-sign"
|
||||||
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Cursors",
|
"title": "Cursors",
|
||||||
"icon": "mouse-pointer-2"
|
"icon": "mouse-pointer-2"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Design",
|
"title": "Design",
|
||||||
"icon": "palette"
|
"icon": "palette"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Coding & development",
|
"title": "Coding & development",
|
||||||
"icon": "code-xml"
|
"icon": "code-2"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Devices",
|
"title": "Devices",
|
||||||
"icon": "smartphone"
|
"icon": "smartphone"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Emoji",
|
"title": "Emoji",
|
||||||
"icon": "smile"
|
"icon": "smile"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "File icons",
|
"title": "File icons",
|
||||||
"icon": "panels-top-left"
|
"icon": "panels-top-left"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Food & beverage",
|
"title": "Food & beverage",
|
||||||
"icon": "coffee"
|
"icon": "coffee"
|
||||||
}
|
}
|
||||||
5
categories/furniture.json
Normal file
5
categories/furniture.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../category.schema.json",
|
||||||
|
"title": "Furniture",
|
||||||
|
"icon": "rocking-chair"
|
||||||
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Gaming",
|
"title": "Gaming",
|
||||||
"icon": "gamepad-2"
|
"icon": "gamepad-2"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Home",
|
"title": "Home",
|
||||||
"icon": "house"
|
"icon": "home"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Layout",
|
"title": "Layout",
|
||||||
"icon": "panels-top-left"
|
"icon": "panels-top-left"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Mail",
|
"title": "Mail",
|
||||||
"icon": "mail"
|
"icon": "mail"
|
||||||
}
|
}
|
||||||
5
categories/maps.json
Normal file
5
categories/maps.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../category.schema.json",
|
||||||
|
"title": "Maps",
|
||||||
|
"icon": "map"
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Mathematics",
|
"title": "Maths",
|
||||||
"icon": "divide"
|
"icon": "divide"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Medical",
|
"title": "Medical",
|
||||||
"icon": "heart"
|
"icon": "heart"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Finance",
|
"title": "Money",
|
||||||
"icon": "piggy-bank"
|
"icon": "piggy-bank"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Multimedia",
|
"title": "Multimedia",
|
||||||
"icon": "circle-play"
|
"icon": "play-circle"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Nature",
|
"title": "Nature",
|
||||||
"icon": "sprout"
|
"icon": "sprout"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Navigation, Maps, and POIs",
|
"title": "Navigation",
|
||||||
"icon": "compass"
|
"icon": "compass"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Notification",
|
"title": "Notifications",
|
||||||
"icon": "triangle-alert"
|
"icon": "alert-triangle"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "People",
|
"title": "People",
|
||||||
"icon": "person-standing"
|
"icon": "person-standing"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Photography",
|
"title": "Photography",
|
||||||
"icon": "camera"
|
"icon": "camera"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Science",
|
"title": "Science",
|
||||||
"icon": "flask-conical"
|
"icon": "flask-conical"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Seasons",
|
"title": "Seasons",
|
||||||
"icon": "leaf"
|
"icon": "leaf"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Security",
|
"title": "Security",
|
||||||
"icon": "shield"
|
"icon": "shield"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Shapes",
|
"title": "Shapes",
|
||||||
"icon": "triangle"
|
"icon": "triangle"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Shopping",
|
"title": "Shopping",
|
||||||
"icon": "shopping-bag"
|
"icon": "shopping-bag"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Social",
|
"title": "Social",
|
||||||
"icon": "thumbs-up"
|
"icon": "thumbs-up"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Sports",
|
"title": "Sports",
|
||||||
"icon": "type"
|
"icon": "type"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Sustainability",
|
"title": "Sustainability",
|
||||||
"icon": "recycle"
|
"icon": "recycle"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Time & calendar",
|
"title": "Time & calendar",
|
||||||
"icon": "calendar"
|
"icon": "calendar"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Tools",
|
"title": "Tools",
|
||||||
"icon": "hammer"
|
"icon": "hammer"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Transportation",
|
"title": "Transportation",
|
||||||
"icon": "train-front"
|
"icon": "train-front"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Travel",
|
"title": "Travel",
|
||||||
"icon": "backpack"
|
"icon": "backpack"
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Weather",
|
"title": "Weather",
|
||||||
"icon": "cloud-sun"
|
"icon": "cloud-sun"
|
||||||
}
|
}
|
||||||
10
cspell.json
10
cspell.json
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"dictionaries": ["en-us", "custom-words"],
|
|
||||||
"dictionaryDefinitions": [
|
|
||||||
{
|
|
||||||
"name": "custom-words",
|
|
||||||
"path": "./.cspell/custom-words.txt",
|
|
||||||
"addWords": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import iconMetaData from '../../data/iconMetaData';
|
import { eventHandler, setResponseHeader } from 'h3'
|
||||||
|
import iconMetaData from '../../data/iconMetaData'
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400');
|
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400')
|
||||||
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');
|
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
|
||||||
|
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(
|
||||||
Object.entries(iconMetaData).map(([name, { categories }]) => [name, categories]),
|
Object.entries(iconMetaData).map(([name, { categories }]) => [ name, categories ])
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
import iconNodes from '../../data/iconNodes/index.ts';
|
|
||||||
import { IconNodeWithKeys } from '../../theme/types';
|
|
||||||
import iconMetaData from '../../data/iconMetaData';
|
|
||||||
import releaseMeta from '../../data/releaseMetaData.json';
|
|
||||||
import categories from '../../data/categoriesData.json';
|
|
||||||
|
|
||||||
const dataResponse = {
|
|
||||||
icons: Object.entries(iconNodes).reduce((acc, [name, iconNode]) => {
|
|
||||||
const newIconNode = (iconNode as IconNodeWithKeys).map(([name, { key, ...attrs }]) => {
|
|
||||||
return [name, attrs];
|
|
||||||
});
|
|
||||||
|
|
||||||
acc[name] = {
|
|
||||||
iconNode: newIconNode,
|
|
||||||
aliases: (iconMetaData[name]?.aliases ?? []).map((alias) =>
|
|
||||||
typeof alias === 'string' ? alias : alias.name,
|
|
||||||
),
|
|
||||||
tags: iconMetaData[name].tags ?? [],
|
|
||||||
categories: iconMetaData[name].categories ?? [],
|
|
||||||
...releaseMeta[name],
|
|
||||||
};
|
|
||||||
|
|
||||||
return acc;
|
|
||||||
}, {}),
|
|
||||||
aliases: Object.entries(iconNodes).reduce((acc, [name]) => {
|
|
||||||
for (const alias of iconMetaData[name]?.aliases ?? []) {
|
|
||||||
acc[typeof alias === 'string' ? alias : alias.name] = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
return acc;
|
|
||||||
}, {}),
|
|
||||||
categories,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
|
||||||
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400');
|
|
||||||
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');
|
|
||||||
|
|
||||||
return dataResponse;
|
|
||||||
});
|
|
||||||
@@ -13,12 +13,7 @@ export default eventHandler((event) => {
|
|||||||
const data = pathData.at(-1).slice(0, -4);
|
const data = pathData.at(-1).slice(0, -4);
|
||||||
const [name] = pathData;
|
const [name] = pathData;
|
||||||
|
|
||||||
const src = Buffer.from(data, 'base64').toString('utf8').replaceAll('\n', '');
|
const src = Buffer.from(data, 'base64').toString('utf8');
|
||||||
|
|
||||||
const width = parseInt((src.includes('<svg ') ? src.match(/width="(\d+)"/)?.[1] : null) ?? '24');
|
|
||||||
const height = parseInt(
|
|
||||||
(src.includes('<svg ') ? src.match(/height="(\d+)"/)?.[1] : null) ?? '24',
|
|
||||||
);
|
|
||||||
|
|
||||||
const children = [];
|
const children = [];
|
||||||
|
|
||||||
@@ -30,36 +25,25 @@ export default eventHandler((event) => {
|
|||||||
.map((_, idx, arr) => arr.slice(0, idx + 1).join('-'))
|
.map((_, idx, arr) => arr.slice(0, idx + 1).join('-'))
|
||||||
.reverse()
|
.reverse()
|
||||||
.find((groupName) => groupName in iconNodes);
|
.find((groupName) => groupName in iconNodes);
|
||||||
if (!(name in iconNodes) && backdropName) {
|
if (backdropName) {
|
||||||
const iconNode = iconNodes[backdropName];
|
const iconNode = iconNodes[backdropName];
|
||||||
|
|
||||||
const LucideIcon = createLucideIcon(backdropName, iconNode);
|
const LucideIcon = createLucideIcon(backdropName, iconNode);
|
||||||
const svg = renderToStaticMarkup(createElement(LucideIcon));
|
const svg = renderToStaticMarkup(createElement(LucideIcon));
|
||||||
const backdropString = svg.replaceAll('\n', '').replace(/<svg[^>]*>|<\/svg>/g, '');
|
const backdropString = svg.replace(/<svg[^>]*>|<\/svg>/g, '');
|
||||||
|
|
||||||
children.push(
|
children.push(
|
||||||
createElement(Backdrop, {
|
createElement(Backdrop, {
|
||||||
backdropString,
|
backdropString,
|
||||||
src: src.replace(/<svg[^>]*>|<\/svg>/g, ''),
|
src,
|
||||||
color: '#777',
|
color: name in iconNodes ? 'red' : '#777',
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const svg = Buffer.from(
|
const svg = Buffer.from(
|
||||||
// We can't use jsx here, is not supported here by nitro.
|
// We can't use jsx here, is not supported here by nitro.
|
||||||
renderToString(
|
renderToString(createElement(SvgPreview, { src, showGrid: true }, children))
|
||||||
createElement(
|
|
||||||
SvgPreview,
|
|
||||||
{
|
|
||||||
src: src.replace(/<svg[^>]*>|<\/svg>/g, ''),
|
|
||||||
height,
|
|
||||||
width,
|
|
||||||
showGrid: true,
|
|
||||||
},
|
|
||||||
children,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
).toString('utf8');
|
).toString('utf8');
|
||||||
|
|
||||||
defaultContentType(event, 'image/svg+xml');
|
defaultContentType(event, 'image/svg+xml');
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
|
||||||
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
|
|
||||||
import { createElement } from 'react';
|
|
||||||
import Diff from '../../../lib/SvgPreview/Diff.tsx';
|
|
||||||
import iconNodes from '../../../data/iconNodes';
|
|
||||||
import createLucideIcon from 'lucide-react/src/createLucideIcon';
|
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
|
||||||
const { params } = event.context;
|
|
||||||
|
|
||||||
const pathData = params.data.split('/');
|
|
||||||
const data = pathData.at(-1).slice(0, -4);
|
|
||||||
const [name] = pathData;
|
|
||||||
|
|
||||||
const newSrc = Buffer.from(data, 'base64')
|
|
||||||
.toString('utf8')
|
|
||||||
.replaceAll('\n', '')
|
|
||||||
.replace(/<svg[^>]*>|<\/svg>/g, '');
|
|
||||||
|
|
||||||
const width = parseInt(
|
|
||||||
(newSrc.includes('<svg ') ? newSrc.match(/width="(\d+)"/)?.[1] : null) ?? '24',
|
|
||||||
);
|
|
||||||
const height = parseInt(
|
|
||||||
(newSrc.includes('<svg ') ? newSrc.match(/height="(\d+)"/)?.[1] : null) ?? '24',
|
|
||||||
);
|
|
||||||
|
|
||||||
const children = [];
|
|
||||||
|
|
||||||
const oldSrc = iconNodes[name]
|
|
||||||
? renderToStaticMarkup(createElement(createLucideIcon(name, iconNodes[name])))
|
|
||||||
.replaceAll('\n', '')
|
|
||||||
.replace(/<svg[^>]*>|<\/svg>/g, '')
|
|
||||||
: '';
|
|
||||||
|
|
||||||
const svg = Buffer.from(
|
|
||||||
// We can't use jsx here, is not supported here by nitro.
|
|
||||||
renderToString(
|
|
||||||
createElement(Diff, { oldSrc, newSrc, showGrid: true, height, width }, children),
|
|
||||||
),
|
|
||||||
).toString('utf8');
|
|
||||||
|
|
||||||
defaultContentType(event, 'image/svg+xml');
|
|
||||||
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
|
||||||
|
|
||||||
return svg;
|
|
||||||
});
|
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
||||||
import { Resvg, initWasm } from '@resvg/resvg-wasm';
|
import { Resvg, initWasm } from '@resvg/resvg-wasm';
|
||||||
import iconNodes from '../../../data/iconNodes';
|
|
||||||
import wasm from './loadWasm';
|
import wasm from './loadWasm';
|
||||||
import { createElement } from 'react';
|
|
||||||
import { renderToStaticMarkup } from 'react-dom/server';
|
|
||||||
import createLucideIcon from 'lucide-react/src/createLucideIcon';
|
|
||||||
|
|
||||||
var initializedResvg = initWasm(wasm);
|
var initializedResvg = initWasm(wasm);
|
||||||
|
|
||||||
@@ -13,37 +9,27 @@ export default eventHandler(async (event) => {
|
|||||||
await initializedResvg;
|
await initializedResvg;
|
||||||
|
|
||||||
const imageSize = 96;
|
const imageSize = 96;
|
||||||
const name = params.data.split('/').at(-3);
|
const [iconSizeString, svgData] = params.data.split('/');
|
||||||
const iconSizeString = params.data.split('/').at(-2);
|
|
||||||
const svgData = params.data.split('/').at(-1);
|
|
||||||
const iconSize = parseInt(iconSizeString, 10);
|
const iconSize = parseInt(iconSizeString, 10);
|
||||||
const data = svgData.slice(0, -4);
|
const data = svgData.slice(0, -4);
|
||||||
|
|
||||||
const prevSvg = iconNodes[name]
|
|
||||||
? renderToStaticMarkup(createElement(createLucideIcon(name, iconNodes[name])))
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
const src = Buffer.from(data, 'base64').toString('utf8');
|
const src = Buffer.from(data, 'base64').toString('utf8');
|
||||||
const svg = (src.includes('<svg') ? src : `<svg>${src}</svg>`)
|
const svg = (src.includes('<svg') ? src : `<svg>${src}</svg>`)
|
||||||
.replace(/(\r\n|\n|\r)/gm, '')
|
.replace(/(\r\n|\n|\r)/gm, '')
|
||||||
.replace(
|
.replace(
|
||||||
/<svg[^>]*>/,
|
/<svg[^>]*/,
|
||||||
`<svg
|
`<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width="${iconSize}"
|
width="${iconSize}"
|
||||||
height="${prevSvg ? iconSize * 2 : iconSize}"
|
height="${iconSize}"
|
||||||
viewBox="0 0 24 ${prevSvg ? 48 : 24}"
|
viewBox="0 0 24 24"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="#fff"
|
stroke="#fff"
|
||||||
stroke-width="2"
|
stroke-width="2"
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
>
|
`
|
||||||
${prevSvg?.replaceAll('\n', '').replace(/<svg[^>]*>|<\/svg>/g, '')}
|
);
|
||||||
<g transform="translate(0, ${prevSvg ? 24 : 0})">
|
|
||||||
`,
|
|
||||||
)
|
|
||||||
.replace(/<\/svg>/, '</g></svg>');
|
|
||||||
|
|
||||||
const resvg = new Resvg(svg, { background: '#000' });
|
const resvg = new Resvg(svg, { background: '#000' });
|
||||||
const pngData = resvg.render();
|
const pngData = resvg.render();
|
||||||
@@ -53,7 +39,7 @@ export default eventHandler(async (event) => {
|
|||||||
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="${imageSize}" height="${prevSvg ? imageSize * 2 : imageSize}" viewBox="0 0 ${imageSize} ${prevSvg ? imageSize * 2 : imageSize}">
|
<svg xmlns="http://www.w3.org/2000/svg" width="${imageSize}" height="${imageSize}" viewBox="0 0 ${imageSize} ${imageSize}">
|
||||||
<style>
|
<style>
|
||||||
@media screen and (prefers-color-scheme: light) {
|
@media screen and (prefers-color-scheme: light) {
|
||||||
#fallback-background { fill: transparent; }
|
#fallback-background { fill: transparent; }
|
||||||
@@ -66,20 +52,20 @@ export default eventHandler(async (event) => {
|
|||||||
<mask id="mask">
|
<mask id="mask">
|
||||||
<image
|
<image
|
||||||
width="${imageSize}"
|
width="${imageSize}"
|
||||||
height="${prevSvg ? imageSize * 2 : imageSize}"
|
height="${imageSize}"
|
||||||
href="data:image/png;base64,${pngBuffer.toString('base64')}"
|
href="data:image/png;base64,${pngBuffer.toString('base64')}"
|
||||||
image-rendering="pixelated"
|
image-rendering="pixelated"
|
||||||
/>
|
/>
|
||||||
</mask>
|
</mask>
|
||||||
<rect
|
<rect
|
||||||
id="fallback-background"
|
id="fallback-background"
|
||||||
width="100%"
|
width="${imageSize}"
|
||||||
height="100%" ry="${imageSize / 24}"
|
height="${imageSize}" ry="${imageSize / 24}"
|
||||||
fill="#fff"
|
fill="#fff"
|
||||||
/>
|
/>
|
||||||
<rect
|
<rect
|
||||||
width="100%"
|
width="${imageSize}"
|
||||||
height="100%"
|
height="${imageSize}"
|
||||||
fill="#000"
|
fill="#000"
|
||||||
mask="url(#mask)"
|
mask="url(#mask)"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
|
|
||||||
wasm = fs.readFileSync(require.resolve('@resvg/resvg-wasm/index_bg.wasm'));
|
wasm = fs.readFileSync(require.resolve('@resvg/resvg-wasm/index_bg.wasm'));
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
|
||||||
wasm = resvg_wasm;
|
wasm = resvg_wasm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
import { eventHandler, setResponseHeader, defaultContentType } from 'h3'
|
||||||
import { renderToString } from 'react-dom/server';
|
import { renderToString } from 'react-dom/server'
|
||||||
import { createElement } from 'react';
|
import { createElement } from 'react'
|
||||||
import SvgPreview from '../../../lib/SvgPreview/index.tsx';
|
import SvgPreview from '../../../lib/SvgPreview/index.tsx';
|
||||||
import createLucideIcon, { IconNode } from 'lucide-react/src/createLucideIcon';
|
import createLucideIcon, { IconNode } from 'lucide-react/src/createLucideIcon'
|
||||||
import { parseSync } from 'svgson';
|
import { parseSync } from 'svgson';
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
const { params } = event.context;
|
const { params } = event.context
|
||||||
|
|
||||||
const [strokeWidth, svgData] = params.data.split('/');
|
const [strokeWidth, svgData] = params.data.split('/');
|
||||||
const data = svgData.slice(0, -4);
|
const data = svgData.slice(0, -4);
|
||||||
@@ -16,8 +16,8 @@ export default eventHandler((event) => {
|
|||||||
const Icon = createLucideIcon(
|
const Icon = createLucideIcon(
|
||||||
'icon',
|
'icon',
|
||||||
parseSync(src.includes('<svg') ? src : `<svg>${src}</svg>`).children.map(
|
parseSync(src.includes('<svg') ? src : `<svg>${src}</svg>`).children.map(
|
||||||
({ name, attributes }) => [name, attributes],
|
({ name, attributes }) => [name, attributes]
|
||||||
) as IconNode,
|
) as IconNode
|
||||||
);
|
);
|
||||||
|
|
||||||
const svg = Buffer.from(
|
const svg = Buffer.from(
|
||||||
@@ -33,12 +33,12 @@ export default eventHandler((event) => {
|
|||||||
@media screen and (prefers-color-scheme: dark) {
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
svg { stroke: #fff; fill: transparent !important; }
|
svg { stroke: #fff; fill: transparent !important; }
|
||||||
}
|
}
|
||||||
</style>`,
|
</style>`
|
||||||
),
|
)
|
||||||
).toString('utf8');
|
).toString('utf8');
|
||||||
|
|
||||||
defaultContentType(event, 'image/svg+xml');
|
defaultContentType(event, 'image/svg+xml')
|
||||||
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000')
|
||||||
|
|
||||||
return svg;
|
return svg
|
||||||
});
|
})
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user