Compare commits

...

39 Commits

Author SHA1 Message Date
Eric Fennis
603ee05674 Add heading icons (#810) 2022-10-23 14:12:17 +02:00
Eric Fennis
be15f5e54b Update README.md 2022-10-20 08:23:27 +02:00
Eric Fennis
ea409105ce Remove post-install lucide-angular (#808)
* remove postinstall

* final fixes
2022-10-20 08:08:42 +02:00
Eric Fennis
969254d986 Update readme and update repo logo (#828)
* Add ids to logos

* try this

* fix viewBox svg images

* update svgs

* Update README.md

* update readme

* fix badges

* small fix

* fix image url
2022-10-19 22:34:35 +02:00
Lucide Bot
200cc17ef6 📦 Bump lucide package versions to 0.92.0 2022-10-19 11:04:51 +00:00
Luke Murray
893119b064 change direction of arrow in sort ascending (#819)
fixes https://github.com/lucide-icons/lucide/issues/805
2022-10-19 12:58:44 +02:00
Alen Šiljak
3e10988978 fixing the link title for Vue 2 (#821) 2022-10-19 12:46:38 +02:00
Alen Šiljak
53a764fc5b main branch name (#824) 2022-10-19 12:44:56 +02:00
Eric Fennis
4cc195092f Add framework svg logos 2022-10-19 09:19:15 +02:00
priority
b7ef305b9f docs: fix click button download zip accidentally (#816) 2022-10-19 07:52:18 +02:00
Alen Šiljak
52896efc94 Adding Svelte to the readme (#820)
* Adding Svelte to the readme

* adding solid section

Co-authored-by: Alen Šiljak <dev@alensiljak.eu.org>
2022-10-18 22:48:25 +02:00
Luke Murray
2c0448a19a Update CONTRIBUTING.md minimum node version (#818)
The build process uses import assertions which were added in Node 16.4. Updating the docs to reflect that since this bit me while contributing.

Example of import assertion

aa524c65a0/scripts/render/processSvg.mjs (L5)

[documentation for when import assertions were added in node](https://nodejs.org/api/esm.html#import-assertions)
2022-10-18 21:56:23 +02:00
Patrick Barrett
aa524c65a0 Fix signal-zero (#812)
Currently the icons `signal-zero` and `signal-low` are exactly the same.

![signal-low](https://github.com/lucide-icons/lucide/blob/main/icons/signal-low.svg)
![signal-zero](https://github.com/lucide-icons/lucide/blob/main/icons/signal-zero.svg)

Previously called out here https://github.com/lucide-icons/lucide/pull/428#issuecomment-1099289022 and confirmed by @ericfennis, the author of the original PR.

I've just manually edited `signal-zero` to remove the second bar.
2022-10-17 09:29:51 +02:00
Lauren Golembiewski
609ca31815 Update GitHub pull request guide link (#807)
Replace existing, broken link with new link found on egghead.
2022-10-16 18:20:20 +02:00
Lucide Bot
8fc34bfe1b 📦 Bump lucide package versions to 0.91.0 2022-10-03 14:45:59 +00:00
Karsa
48fa902b1c Added ear and ear-off (#804)
* Added ear and ear-off

* Fixes incorrect commit

Co-authored-by: Karsa <karsa@karsa.org>
2022-10-03 16:37:05 +02:00
Eric Fennis
cdd57e6610 Add Solid package (#797)
* init solid package

* add testing

* Fix tests solid

* add workflow

* update types build

* Fix typings file

* switch to camelCase props

* revert camelcased props

* Fix tests

* Fixing dynamic reactive props in lucide icons

* release beta

* strokeWidth fix

* bump beta version

* improve docs

* update beta release

* update vitest config

* Add automatic release for solid package
2022-10-03 16:36:33 +02:00
Lucide Bot
1f5119785b 📦 Bump lucide package versions to 0.90.0 2022-09-20 06:18:24 +00:00
Oliver Schmidt
90a3f6e1dd Add book-open-check icon #789 (#790)
* Add book-open-check icon

* Added tags for book-open-check

* Update icons/book-open-check.svg

Co-authored-by: Karsa <contact@karsa.org>

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: Karsa <contact@karsa.org>
2022-09-20 08:12:10 +02:00
Lucide Bot
4ae4eae53d 📦 Bump lucide package versions to 0.89.0 2022-09-15 09:26:27 +00:00
Eric Fennis
e99228c65d Add plug icons (#786)
>
>
Co-authored-by: Karsa <karsa@karsa.org>
2022-09-15 11:18:55 +02:00
Eric Fennis
34249ff42c Fix site build (#796)
* Some fixes site

* A lot of fixes in the site

* move file
2022-09-13 09:03:13 +02:00
andreas
f9d37968d6 Fix typo in lucide-vuew (#795) 2022-09-12 21:26:35 +02:00
Chad Fernandez
864b71822b Fixed a small typo in the docs. (#787) 2022-08-25 11:44:40 +02:00
Lucide Bot
bc3bd1267a 📦 Bump lucide package versions to 0.88.0 2022-08-18 16:29:35 +00:00
Karsa
5d22d8e456 Added sailboat (#665)
* Added accessibility icon as per https://github.com/feathericons/feather/issues/633

* added newline to end of file

* Updated icon to comply with design guidelines and more closely match accessibleicon.org

* Added sailboat

* Updates icon based on @ericfennis' suggestion. Adds harbour and port tags.

* Update icons/sailboat.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>

* Update icons/sailboat.svg

Merge extra paths into a single triangle.

Co-authored-by: Karsa <karsa@karsa.org>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2022-08-18 18:20:10 +02:00
Lucide Bot
db98602331 📦 Bump lucide package versions to 0.87.0 2022-08-18 10:25:46 +00:00
it-is-not
4eca473cd4 Add arrow-up-down icon (#785)
* add arrow-up-down icon

* add more tags

* Update tags.json

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/arrow-up-down.svg

Co-authored-by: Karsa <contact@karsa.org>

* add tags to arrow-left-right

Co-authored-by: Karsa <contact@karsa.org>
2022-08-18 12:18:23 +02:00
Eric Fennis
e6eedee22d Add version command to package.jsons 2022-08-10 19:12:21 +02:00
Lucide Bot
a8174a34b5 📦 Bump lucide package versions to 0.86.0 2022-08-10 13:38:57 +00:00
Karsa
3196af66ce Adds remaning hotel icons. (#756)
Co-authored-by: Karsa <karsa@karsa.org>
2022-08-10 15:32:26 +02:00
Eric Fennis
dd593e3dc3 Add no --no-git-checks for release workflow 2022-08-10 15:31:25 +02:00
Reund0
d4fe0470ae add "aspect-ratio-16x9" or "rectangle" icon (#754)
* Adding "aspect-ratio-16x9" icon tag

* Add files via upload

* editing icons tags

add "inspect ratio" tags to "rectangle-horizontal", "rectangle-vertical", "square" icons.

* Update and rename aspect-ratio-16x9.svg to rectangle-horizontal.svg

Changing icon name and rectangle sizes.

* Create rectangle-vertical

* Update tags.json

* Rename rectangle-vertical to rectangle-vertical.svg
2022-08-10 09:15:53 +02:00
Eric Fennis
318c024589 Migrate to PNPM (#777)
* add pnpm

* make it work

* fix comamnds in package.jsons

* move some scripts to modules

* workflow fixes

* test workflow

* test #2

* minor fix

* update lockflite

* create workflows

* update workflow

* Add copy license command

* Fix build

* update workflows

* update contributions.md

* migrate site directory to pnpm

* Fix peer dependencies when install

* fix types in lucide-angular

* fix testing
2022-08-10 09:10:53 +02:00
jcleme
bd8b669666 Add color prop to "Additional Props" example (#783)
The additional props example previously had no props at all, this adds the color prop to solve that problem.
2022-08-08 20:34:44 +02:00
Karsa
89baeeeb63 Adds airplane tag to plane. Removes plane tag from plane. (#780) 2022-08-02 07:43:34 +02:00
Lucide Bot
9fbec87eb0 📦 Bump lucide package versions to 0.84.0 2022-07-31 17:48:09 +00:00
Karsa
a9a441b6de Adds citrus icon (#758)
Co-authored-by: Karsa <karsa@karsa.org>
2022-07-31 19:40:16 +02:00
Lucide Bot
40b11ec1fc 📦 Bump lucide package versions to 0.83.0 2022-07-21 07:05:54 +00:00
217 changed files with 26552 additions and 34744 deletions

View File

@@ -17,5 +17,9 @@ module.exports = {
trailingComma: 'all'
}
]
}
},
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./site/tsconfig.json', './packages/*/tsconfig.json'],
},
};

View File

@@ -14,15 +14,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Fetch tags
run: git fetch --all --tags
@@ -32,7 +50,7 @@ jobs:
run: echo "::set-output name=LATEST_TAG::$(git describe --tags `git rev-list --tags --max-count=1`)"
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Check if we can patch
run: .github/workflows/version-up.sh --minor
@@ -44,7 +62,7 @@ jobs:
- name: Create change log
id: change-log
run: |
CHANGE_LOG=$(yarn --silent run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }})
CHANGE_LOG=$(pnpm run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }})
CHANGE_LOG="${CHANGE_LOG//'%'/'%25'}"
CHANGE_LOG="${CHANGE_LOG//$'\n'/'%0A'}"
CHANGE_LOG="${CHANGE_LOG//$'\r'/'%0D'}"

48
.github/workflows/lucide-angular.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide Angular checks
on:
pull_request:
paths:
- packages/lucide-angular/**
push:
paths:
- packages/lucide-angular/**
jobs:
lucide-angular:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-angular build
- name: Test
run: pnpm --filter lucide-angular test

48
.github/workflows/lucide-preact.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide Preact Checks
on:
pull_request:
paths:
- packages/lucide-preact/**
push:
paths:
- packages/lucide-preact/**
jobs:
lucide-preact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-preact build
- name: Test
run: pnpm --filter lucide-preact test

View File

@@ -0,0 +1,48 @@
name: Lucide React Native checks
on:
pull_request:
paths:
- packages/lucide-react-native/**
push:
paths:
- packages/lucide-react-native/**
jobs:
lucide-react-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-react-native build
- name: Test
run: pnpm --filter lucide-react-native test

48
.github/workflows/lucide-react.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide React Checks
on:
pull_request:
paths:
- packages/lucide-react/**
push:
paths:
- packages/lucide-react/**
jobs:
lucide-react:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-react build
- name: Test
run: pnpm --filter lucide-react test

48
.github/workflows/lucide-solid.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide Solid Checks
on:
pull_request:
paths:
- packages/lucide-solid/**
push:
paths:
- packages/lucide-solid/**
jobs:
lucide-solid:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-solid build
- name: Test
run: pnpm --filter lucide-solid test

45
.github/workflows/lucide-static.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: Lucide Static checks
on:
pull_request:
paths:
- packages/lucide-static/**
push:
paths:
- packages/lucide-static/**
jobs:
lucide-static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-static build

48
.github/workflows/lucide-svelte.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide Svelte checks
on:
pull_request:
paths:
- packages/lucide-svelte/**
push:
paths:
- packages/lucide-svelte/**
jobs:
lucide-svelte:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-svelte build
- name: Test
run: pnpm --filter lucide-svelte test

48
.github/workflows/lucide-vue-next.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide Vue Next checks
on:
pull_request:
paths:
- packages/lucide-vue-next/**
push:
paths:
- packages/lucide-vue-next/**
jobs:
lucide-vue-next:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-vue-next build
- name: Test
run: pnpm --filter lucide-vue-next test

48
.github/workflows/lucide-vue.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide Vue checks
on:
pull_request:
paths:
- packages/lucide-vue/**
push:
paths:
- packages/lucide-vue/**
jobs:
lucide-vue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide-vue build
- name: Test
run: pnpm --filter lucide-vue test

48
.github/workflows/lucide.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lucide checks
on:
pull_request:
paths:
- packages/lucide/**
push:
paths:
- packages/lucide/**
jobs:
lucide:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter lucide build
- name: Test
run: pnpm --filter lucide test

View File

@@ -13,7 +13,7 @@ on:
jobs:
pre-build:
if: github.repository == 'lucide-icons/lucide' && contains('["locness3","ericfennis", "johnletey"]', github.actor)
if: github.repository == 'lucide-icons/lucide' && contains('["locness3","ericfennis", "johnletey", "karsa-mistmere"]', github.actor)
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
@@ -33,30 +33,47 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set new version
run: yarn workspace lucide version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide build
run: pnpm --filter lucide build
- name: Test
run: yarn workspace lucide test
run: pnpm --filter lucide test
- name: Publish
run: yarn workspace lucide publish
run: pnpm --filter lucide publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -71,30 +88,47 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: yarn workspace lucide-react version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-react version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-react build
run: pnpm --filter lucide-react build
- name: Test
run: yarn workspace lucide-react test
run: pnpm --filter lucide-react test
- name: Publish
run: yarn workspace lucide-react publish
run: pnpm --filter lucide-react publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -109,30 +143,47 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: yarn workspace lucide-react-native version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-react-native version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-react-native build
run: pnpm --filter lucide-react-native build
- name: Test
run: yarn workspace lucide-react-native test
run: pnpm --filter lucide-react-native test
- name: Publish
run: yarn workspace lucide-react-native publish
run: pnpm --filter lucide-react-native publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -147,30 +198,47 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set new version
run: yarn workspace lucide-vue version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-vue version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-vue build
run: pnpm --filter lucide-vue build
- name: Test
run: yarn workspace lucide-vue test
run: pnpm --filter lucide-vue test
- name: Publish
run: yarn workspace lucide-vue publish
run: pnpm --filter lucide-vue publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -185,30 +253,47 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set new version
run: yarn workspace lucide-vue-next version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-vue-next version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-vue-next build
run: pnpm --filter lucide-vue-next build
- name: Test
run: yarn workspace lucide-vue-next test
run: pnpm --filter lucide-vue-next test
- name: Publish
run: yarn workspace lucide-vue-next publish
run: pnpm --filter lucide-vue-next publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -223,30 +308,47 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: yarn workspace lucide-angular version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-angular version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-angular build
run: pnpm --filter lucide-angular build
- name: Test
run: yarn workspace lucide-angular test:headless
run: pnpm --filter lucide-angular test
- name: Publish
run: yarn workspace lucide-angular publish dist
run: pnpm --filter lucide-angular publish dist --no-git-checks --ignore-scripts
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -261,30 +363,47 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: yarn workspace lucide-preact version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-preact version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-preact build
run: pnpm --filter lucide-preact build
- name: Test
run: yarn workspace lucide-preact test
run: pnpm --filter lucide-preact test
- name: Publish
run: yarn workspace lucide-preact publish
run: pnpm --filter lucide-preact publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -292,6 +411,61 @@ jobs:
name: lucide-preact-package-json
path: packages/lucide-preact/package.json
lucide-solid:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: pnpm --filter lucide-solid version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide-solid build
- name: Test
run: pnpm --filter lucide-solid test
- name: Publish
run: pnpm --filter lucide-solid publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-solid-package-json
path: packages/lucide-solid/package.json
lucide-svelte:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
@@ -299,30 +473,47 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: yarn workspace lucide-svelte version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-svelte version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-svelte build
run: pnpm --filter lucide-svelte build
- name: Test
run: yarn workspace lucide-svelte test
run: pnpm --filter lucide-svelte test
- name: Publish
run: yarn workspace lucide-svelte publish
run: pnpm --filter lucide-svelte publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -338,30 +529,47 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set new version
run: yarn workspace lucide-static version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-static version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Move Font
run: cp -r lucide-font packages/lucide-static/font
- name: Build
run: yarn workspace lucide-static build
run: pnpm --filter lucide-static build
- name: Publish
run: yarn workspace lucide-static publish
run: pnpm --filter lucide-static publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
@@ -375,13 +583,29 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3.4.1
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install FontForge
run: sudo apt-get install zlib1g-dev fontforge
@@ -407,13 +631,13 @@ jobs:
- name: Install Font Custom dependency
run: sudo gem install fontcustom
- name: Install
run: yarn --frozen-lockfile
- name: Install dependencies
run: pnpm install
- name: Build Icon Font
run: |
mkdir lucide-font
yarn build:outline-icons --outputDir=converted_icons && fontcustom compile "./converted_icons" -h -n "lucide" -o ./lucide-font -F
pnpm build:outline-icons --outputDir=converted_icons && fontcustom compile "./converted_icons" -h -n "lucide" -o ./lucide-font -F
- name: "Upload to Artifacts"
uses: actions/upload-artifact@v1
@@ -474,6 +698,10 @@ jobs:
run: flutter test
working-directory: packages/lucide-flutter
- name: Copy License
run: cp ../../LICENSE ./LICENSE
working-directory: packages/lucide-flutter
- name: Update yaml
run: sed -E 's/(version:)[^\n]*/\1 ${{ needs.pre-build.outputs.VERSION }}/;' pubspec.yaml > pubspec && mv pubspec pubspec.yaml
working-directory: packages/lucide-flutter

View File

@@ -1,36 +0,0 @@
name: Test Lucide Svelte
on:
pull_request:
paths:
- packages/lucide-svelte/**
push:
paths:
- packages/lucide-svelte/**
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
lucide-svelte:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
- name: Build
run: yarn workspace lucide-svelte build
- name: Test
run: yarn workspace lucide-svelte test

View File

@@ -1,36 +0,0 @@
name: Test Lucide Vue Next
on:
pull_request:
paths:
- packages/lucide-vue-next/**
push:
paths:
- packages/lucide-vue-next/**
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
lucide-vue-next:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
- name: Build
run: yarn workspace lucide-vue-next build
- name: Test
run: yarn workspace lucide-vue-next test

View File

@@ -1,36 +0,0 @@
name: Test Lucide Vue
on:
pull_request:
paths:
- packages/lucide-vue/**
push:
paths:
- packages/lucide-vue/**
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
lucide-vue:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
- name: Build
run: yarn workspace lucide-vue build
- name: Test
run: yarn workspace lucide-vue test

1
.gitignore vendored
View File

@@ -14,3 +14,4 @@ stats
*.log
packages/**/src/icons/*.js
packages/**/src/icons/*.ts
packages/**/LICENSE

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
auto-install-peers=true

View File

@@ -10,13 +10,13 @@ The following is a set of guidelines for contributing to Lucide. Feel free to pr
Feel free to open a pull-request to contribute to this project.
**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
[How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github)
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 wont make apparent.
- __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 bugfix or new feature should go to the `master` 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 commit, it won't be accepted.
### Pull Requests Including Icons
@@ -65,7 +65,7 @@ If you are a designer who wants to contribute to Lucide but you don't know what
## Development
You will need minimum version of [Nodejs 16+](https://nodejs.org)
You will need minimum version of [Nodejs 16.4+](https://nodejs.org)
For packagemanagement you will need [yarn v1](https://yarnpkg.com/getting-started/install).
For flutter package development, you need [Flutter 1.17+](https://docs.flutter.dev/get-started/install).
@@ -75,13 +75,13 @@ After cloning the project you need to run:
yarn # Install dependencies, including the workspace packages
```
### Packages -> Yarn Workspaces
### Packages -> PNPM Workspaces
To distribute different packages we use yarn workspaces. Before you start make sure you are familiar with this setup. Read guide here: [yarn workspaces](https://classic.yarnpkg.com/lang/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/en/docs/workspaces).
The configured directory for workspaces is the [packages](./packages) directory, located in the root directory. There you will find all the current packages from lucide.
> Note: One package is not managed by yarn: **lucide-flutter**
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
### Generated Code
@@ -96,11 +96,11 @@ The commands for generating this code you will read in the next chapter.
The build script includes multiple subcommands to: clean the dist directory, generate icon files, generate types files, and build/transpile code for each build format.
```sh
yarn [package-name] build
pnpm [package-name] build
#example:
yarn lucide-react build
pnpm lucide-react build
```
#### Testing
@@ -108,21 +108,21 @@ yarn lucide-react build
Run unit tests with jest for each package to make sure all the package apis still works as expected.
```sh
yarn [package-name] test
pnpm [package-name] test
#example:
yarn lucide-vue test
pnpm lucide-vue test
```
Recommended to run the test watcher when making changes.
```sh
yarn [package-name] test:watch
pnpm [package-name] test:watch
#example:
yarn lucide-preact test:watch
pnpm lucide-preact test:watch
```
### Unit Testing
@@ -131,15 +131,17 @@ When adding new features to for example the icon component for a framework. It i
### Local Testing
To test changes in a local project, you can use `yarn link` or `npm link` to link the package. Before you do this make sure you builded 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
# in packages/lucide-react
yarn link
npm run build &&
npm link
# in your local project
yarn link lucide-react
npm link lucide-react
```
## Project Structure
@@ -168,7 +170,7 @@ All the icons of lucide in SVG format. These will be used as source for all the
Includes all the (npm) packages of lucide.
> Note: One package is not managed by yarn: **lucide-flutter**
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
### scripts

View File

@@ -1,15 +1,15 @@
<p align=center><img width="410" src="https://lucide.dev/logo-text.svg" alt="Lucide Logo"></p>
<p align=center><img width="480" src="https://lucide.dev/lucide-logo-repo.svg" alt="Lucide Logo"></p>
<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://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://discord.gg/EH6nSts"><img src="https://img.shields.io/discord/723074157486800936?label=chat&logo=discord&logoColor=%23ffffff&colorB=%237289DA" alt="discord chat"></a>
</p>
# Lucide
![NPM](https://img.shields.io/npm/l/lucide)
[![npm](https://img.shields.io/npm/v/lucide)](https://www.npmjs.com/package/lucide)
[![installs](https://img.shields.io/endpoint?logo=figma&label=installs&url=https://yuanqing.github.io/figma-plugins-stats/plugin/939567362549682242/installs.json)](https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons)
[![Discord](https://img.shields.io/discord/723074157486800936?label=chat&logo=discord&logoColor=%23ffffff&colorB=%237289DA)](https://discord.gg/EH6nSts)
## What is Lucide?
Lucide is a community-run fork of [Feather Icons](https://github.com/feathericons/feather), open for anyone to contribute icons.
Community-run fork of [Feather Icons](https://github.com/feathericons/feather), open for anyone to contribute icons.
It began after growing disaffection 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.
@@ -23,24 +23,25 @@ Lucide is trying to expand the icon set as much as possible while staying faithf
## Table of Contents
* [Installation](#installation)
* [Package managers](#package-managers)
* [CDN](#cdn)
* [Usage](#usage)
* [Web](#web)
* [React](#react)
* [React Native](#react-native)
* [Vue 2](#vue-2)
* [Vue 3](#vue-3)
* [Angular](#angular)
* [Preact](#preact)
* [Static](#static-svg-sprite-font-icons-)
* [Figma](#figma)
* [Laravel](#laravel)
* [Flutter](#flutter)
* [Contributing](#contributing)
* [Community](#community)
* [License](#license)
- [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)
- [Flutter](#flutter)
- [Svelte](#svelte)
- [Solid](#solid)
- [Contributing](#contributing)
- [Community](#community)
- [License](#license)
- [Credits](#credits)
- [Sponsors](#sponsors)
## Usage
@@ -89,7 +90,7 @@ yarn add lucide-react-native
npm install lucide-react-native
```
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-react-native#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
@@ -190,6 +191,34 @@ flutter pub add lucide_icons
For more details, see the [pub.dev](https://pub.dev/packages/lucide_icons).
### Svelte
Implementation of the lucide icon library for Svelte applications.
```sh
yarn add lucide-svelte
# or
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
npm install lucide-solid
```
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-solid#lucide-solid).
## Contributing
For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).

View File

@@ -8,7 +8,7 @@ title: Comparison
Lucide is a community-run fork of [Feather Icons](https://github.com/feathericons/feather).
It began after growing disaffection of 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 adn not maintained actively. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted.
It began after growing disaffection of 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 and not maintained actively. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted.
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.

View File

@@ -18,7 +18,7 @@ npm install lucide-preact
## How to use
It's build with ESmodules so it's completely threeshakable.
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a preact component.
### Example

View File

@@ -16,7 +16,7 @@ npm install lucide-react-native
## How to use
It's build with ESmodules so it's completely threeshakable.
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a react component.
### Example

View File

@@ -14,7 +14,7 @@ npm install lucide-react
## How to use
It's build with ESmodules so it's completely threeshakable.
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a react component.
### Example

View File

@@ -35,7 +35,7 @@ You can pass additional props to adjust the icon.
import { Camera } from 'lucide-svelte'
</script>
<Camera />
<Camera color="#ff3e98" />
```
### Available props

View File

@@ -2,7 +2,7 @@
Implementation of the lucide icon library for Vue 3 applications.
> ⚠️ This version of lucide is for Vue 3, For Vue 2 got to [lucide-vue-next](lucide-vue)
> ⚠️ This version of lucide is for Vue 3, For Vue 2 got to [lucide-vue](lucide-vue)
## Installation
@@ -20,7 +20,7 @@ npm install lucide-vue-next
## How to use
It's build with ESmodules so it's completely threeshakable.
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a vue component.
### Example

View File

@@ -16,7 +16,7 @@ npm install lucide-vue
## How to use
It's build with ESmodules so it's completely threeshakable.
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a vue component.
### Example

View File

@@ -44,7 +44,7 @@ Here is a complete example with unpkg
### With ESModules
To reduce bundle size, lucide is built to be fully treeshakable.
To reduce bundle size, lucide is built to be fully tree-shakable.
The `createIcons` function will search for HTMLElements with the attribute `icon-name` and replace it with the svg from the given icon name.
```html

16
icons/arrow-up-down.svg Normal file
View File

@@ -0,0 +1,16 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="11 17 7 21 3 17"/>
<line x1="7" y1="21" x2="7" y2="9"/>
<polyline points="21 7 17 3 13 7"/>
<line x1="17" y1="15" x2="17" y2="3"/>
</svg>

After

Width:  |  Height:  |  Size: 365 B

15
icons/book-open-check.svg Normal file
View File

@@ -0,0 +1,15 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M8 3H2v15h7c1.7 0 3 1.3 3 3V7c0-2.2-1.8-4-4-4Z" />
<path d="m16 12 2 2 4-4" />
<path d="M22 6V3h-6c-2.2 0-4 1.8-4 4v14c0-1.7 1.3-3 3-3h7v-2.3" />
</svg>

After

Width:  |  Height:  |  Size: 369 B

17
icons/citrus.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M5.51 18.49a12 12 0 0 0 16.12.78c.49-.41.49-1.15.03-1.6L6.34 2.33a1.08 1.08 0 0 0-1.6.03A12 12 0 0 0 5.5 18.5Z" />
<path d="M8.34 15.66a8 8 0 0 0 10.4.78c.54-.4.54-1.16.06-1.64L9.2 5.2c-.48-.48-1.25-.48-1.64.06a8 8 0 0 0 .78 10.4Z" />
<path d="m14 10-5.5 5.5" />
<path d="M14 10v8" />
<path d="M14 10H6" />
</svg>

After

Width:  |  Height:  |  Size: 534 B

16
icons/concierge-bell.svg Normal file
View File

@@ -0,0 +1,16 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M2 18a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v2H2v-2Z" />
<path d="M20 16a8 8 0 1 0-16 0" />
<path d="M12 4v4" />
<path d="M10 4h4" />
</svg>

After

Width:  |  Height:  |  Size: 351 B

17
icons/ear-off.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M6 18.5a3.5 3.5 0 1 0 7 0c0-1.57.92-2.52 2.04-3.46" />
<path d="M6 8.5c0-.75.13-1.47.36-2.14" />
<path d="M8.8 3.15A6.5 6.5 0 0 1 19 8.5c0 1.63-.44 2.81-1.09 3.76" />
<path d="M12.5 6A2.5 2.5 0 0 1 15 8.5M10 13a2 2 0 0 0 1.82-1.18" />
<line x1="2" y1="2" x2="22" y2="22" />
</svg>

After

Width:  |  Height:  |  Size: 501 B

14
icons/ear.svg Normal file
View File

@@ -0,0 +1,14 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0" />
<path d="M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4" />
</svg>

After

Width:  |  Height:  |  Size: 337 B

14
icons/fan.svg Normal file
View File

@@ -0,0 +1,14 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M10.827 16.379a6.082 6.082 0 0 1-8.618-7.002l5.412 1.45a6.082 6.082 0 0 1 7.002-8.618l-1.45 5.412a6.082 6.082 0 0 1 8.618 7.002l-5.412-1.45a6.082 6.082 0 0 1-7.002 8.618l1.45-5.412Z" />
<path d="M12 12v.01" />
</svg>

After

Width:  |  Height:  |  Size: 431 B

16
icons/heading-1.svg Normal file
View File

@@ -0,0 +1,16 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 12h8" />
<path d="M4 18V6" />
<path d="M12 18V6" />
<path d="m17 12 3-2v8" />
</svg>

After

Width:  |  Height:  |  Size: 306 B

16
icons/heading-2.svg Normal file
View File

@@ -0,0 +1,16 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 12h8" />
<path d="M4 18V6" />
<path d="M12 18V6" />
<path d="M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" />
</svg>

After

Width:  |  Height:  |  Size: 331 B

17
icons/heading-3.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 12h8" />
<path d="M4 18V6" />
<path d="M12 18V6" />
<path d="M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" />
<path d="M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" />
</svg>

After

Width:  |  Height:  |  Size: 393 B

17
icons/heading-4.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 12h8" />
<path d="M4 18V6" />
<path d="M12 18V6" />
<path d="M17 10v4h4" />
<path d="M21 10v8" />
</svg>

After

Width:  |  Height:  |  Size: 328 B

17
icons/heading-5.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 12h8" />
<path d="M4 18V6" />
<path d="M12 18V6" />
<path d="M17 13v-3h4" />
<path d="M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17" />
</svg>

After

Width:  |  Height:  |  Size: 385 B

17
icons/heading-6.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 12h8" />
<path d="M4 18V6" />
<path d="M12 18V6" />
<circle cx="19" cy="16" r="2" />
<path d="M20 10c-2 2-3 3.5-3 6" />
</svg>

After

Width:  |  Height:  |  Size: 350 B

15
icons/heading.svg Normal file
View File

@@ -0,0 +1,15 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M6 12h12" />
<path d="M6 20V4" />
<path d="M18 20V4" />
</svg>

After

Width:  |  Height:  |  Size: 279 B

17
icons/microwave.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="2" y="4" width="20" height="15" rx="2" />
<rect x="6" y="8" width="8" height="7" rx="1" />
<path d="M18 8v7" />
<path d="M6 19v2" />
<path d="M18 19v2" />
</svg>

After

Width:  |  Height:  |  Size: 382 B

17
icons/plug-2.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M9 2v6" />
<path d="M15 2v6" />
<path d="M12 17v5" />
<path d="M5 8h14" />
<path d="M6 11V8h12v3a6 6 0 1 1-12 0v0Z" />
</svg>

After

Width:  |  Height:  |  Size: 346 B

16
icons/plug.svg Normal file
View File

@@ -0,0 +1,16 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 22v-5" />
<path d="M9 7V2" />
<path d="M15 7V2" />
<path d="M6 13V8h12v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4Z" />
</svg>

After

Width:  |  Height:  |  Size: 338 B

View File

@@ -0,0 +1,13 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="2" y="6" width="20" height="12" rx="2"/>
</svg>

After

Width:  |  Height:  |  Size: 273 B

View File

@@ -0,0 +1,13 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="6" y="2" width="12" height="20" rx="2"/>
</svg>

After

Width:  |  Height:  |  Size: 260 B

15
icons/refrigerator.svg Normal file
View File

@@ -0,0 +1,15 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M5 6a4 4 0 0 1 4-4h6a4 4 0 0 1 4 4v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6Z" />
<path d="M5 10h14" />
<path d="M15 7v6" />
</svg>

After

Width:  |  Height:  |  Size: 341 B

15
icons/sailboat.svg Normal file
View File

@@ -0,0 +1,15 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M22 18H2a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4Z"/>
<path d="M21 14 10 2 3 14h18Z"/>
<path d="M10 2v16"/>
</svg>

After

Width:  |  Height:  |  Size: 321 B

22
icons/shower-head.svg Normal file
View File

@@ -0,0 +1,22 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="m4 4 2.5 2.5" />
<path d="M13.5 6.5a4.95 4.95 0 0 0-7 7" />
<path d="M15 5 5 15" />
<path d="M14 17v.01" />
<path d="M10 16v.01" />
<path d="M13 13v.01" />
<path d="M16 10v.01" />
<path d="M11 20v.01" />
<path d="M17 14v.01" />
<path d="M20 11v.01" />
</svg>

After

Width:  |  Height:  |  Size: 489 B

View File

@@ -10,5 +10,4 @@
stroke-linejoin="round"
>
<path d="M2 20h.01" />
<path d="M7 20v-4" />
</svg>

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 233 B

View File

@@ -9,9 +9,9 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M11 5h4" />
<path d="M11 9h7" />
<path d="M11 13h10" />
<path d="m3 17 3 3 3-3" />
<path d="M6 18V4" />
<path d="M11 11H15" />
<path d="M11 15H18" />
<path d="M11 19H21" />
<path d="M9 7L6 4L3 7" />
<path d="M6 6L6 20" />
</svg>

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 336 B

View File

@@ -1,85 +1,56 @@
{
"private": true,
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/jest",
"**/jest/**",
"**/jasmine",
"**/jasmine/**",
"**/react",
"**/react/**",
"**/testing-library__jest-dom",
"**/testing-library__jest-dom/**",
"**/testing-library__react-hooks",
"**/testing-library__react-hooks/**",
"**/react-dom",
"**/react-dom/**",
"**/react-test-renderer",
"**/react-test-renderer/**",
"**/vue",
"**/vue/**",
"**/vue-template-compiler",
"**/vue-template-compiler/**",
"**/vue-template-es2015-compiler",
"**/vue-template-es2015-compiler/**",
"**/@testing-library/vue",
"**/@testing-library/vue/**"
]
},
"scripts": {
"build": "yarn lucide build && yarn lucide-react build && yarn lucide-react-native build && yarn lucide-preact build && yarn lucide-vue build && yarn lucide-vue-next build && yarn lucide-angular build",
"test": "yarn lucide build:icons && yarn lucide-react build:icons && yarn lucide-vue build:icons && jest",
"lucide": "yarn workspace lucide",
"lucide-angular": "yarn workspace lucide-angular",
"lucide-react": "yarn workspace lucide-react",
"lucide-react-native": "yarn workspace lucide-react-native",
"lucide-preact": "yarn workspace lucide-preact",
"lucide-vue": "yarn workspace lucide-vue",
"lucide-vue-next": "yarn workspace lucide-vue-next",
"lucide-svelte": "yarn workspace lucide-svelte",
"lucide-static": "yarn workspace lucide-static",
"build:icons": "babel-node ./scripts/buildIcons.js --presets @babel/env",
"build:outline-icons": "babel-node ./scripts/outlineSvg.js --presets @babel/env",
"generate:supersprite": "babel-node ./scripts/generateSuperSVG.js",
"optimize": "esbuild ./scripts/optimizeSvgs.js --bundle --platform=node | node",
"addtags": "babel-node ./scripts/addMissingKeysToTags.js --presets @babel/env",
"generate:changelog": "babel-node ./scripts/generateChangelog.js --presets @babel/env"
"build": "pnpm -r --filter './packages/**' build",
"test": "pnpm -r --filter './packages/**' test",
"lucide": "pnpm --filter lucide",
"lucide-angular": "pnpm --filter lucide-angular",
"lucide-react": "pnpm --filter lucide-react",
"lucide-react-native": "pnpm --filter lucide-react-native",
"lucide-preact": "pnpm --filter lucide-preact",
"lucide-vue": "pnpm --filter lucide-vue",
"lucide-vue-next": "pnpm --filter lucide-vue-next",
"lucide-svelte": "pnpm --filter lucide-svelte",
"lucide-static": "pnpm --filter lucide-static",
"build:icons": "node ./scripts/buildIcons.mjs --templateSrc ./packages/lucide/scripts/exportTemplate.mjs",
"build:outline-icons": "node ./scripts/outlineSvg.mjs",
"generate:supersprite": "node ./scripts/generateSuperSVG.mjs",
"optimize": "node ./scripts/optimizeSvgs.mjs",
"addtags": "node ./scripts/addMissingKeysToTags.mjs",
"generate:changelog": "node ./scripts/generateChangelog.mjs"
},
"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.25.2",
"@atomico/rollup-plugin-sizes": "^1.1.4",
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.1",
"@babel/node": "^7.13.10",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.0",
"@rollup/plugin-babel": "^5.0.0",
"@babel/cli": "^7.18.9",
"@babel/core": "^7.18.9",
"@babel/node": "^7.18.9",
"@babel/plugin-transform-runtime": "^7.18.9",
"@babel/preset-env": "^7.18.9",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.2.0",
"@rollup/plugin-replace": "^2.4.1",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.4.2",
"babel-jest": "^26.6.3",
"babel-plugin-add-import-extension": "^1.4.3",
"core-js": "3",
"esbuild": "^0.14.28",
"babel-plugin-add-import-extension": "^1.6.0",
"core-js": "^3.24.0",
"esbuild": "^0.14.51",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.5.0",
"eslint-plugin-prettier": "^2.5.0",
"husky": "^4.3.6",
"jest": "^26.4.2",
"lint-staged": "^10.5.3",
"eslint-config-prettier": "^2.10.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^2.7.0",
"husky": "^4.3.8",
"jest": "^28.1.3",
"lint-staged": "^10.5.4",
"minimist": "^1.2.6",
"node-fetch": "^2.6.7",
"prettier": "1.17.1",
"rollup": "^2.7.3",
"rollup-plugin-license": "^2.0.0",
"rollup": "^2.77.2",
"rollup-plugin-license": "^2.8.1",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^5.2.0",
"rollup-plugin-visualizer": "^4.1.0",
"rollup-plugin-terser": "^5.3.1",
"rollup-plugin-visualizer": "^4.2.2",
"@rollup/plugin-typescript": "^8.3.4",
"svg-outline-stroke": "^1.3.1",
"svgo": "^2.8.0",
"svgson": "^4.1.0"
@@ -90,7 +61,6 @@
}
},
"lint-staged": {
"icons/*.svg": "npx babel-node ./scripts/optimizeStagedSvgs.js --presets @babel/env"
},
"dependencies": {}
"icons/*.svg": "node ./scripts/optimizeStagedSvgs.mjs"
}
}

View File

@@ -1,15 +0,0 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -1,7 +1,7 @@
{
"name": "lucide-angular",
"description": "A Lucide icon library package for Angular applications",
"version": "0.82.0",
"version": "0.92.0",
"author": "SMAH1",
"license": "ISC",
"homepage": "https://lucide.dev",
@@ -22,15 +22,16 @@
"Font Awesome"
],
"scripts": {
"build": "yarn clean && yarn build:icons && yarn build:ng",
"clean": "npx shx rm -rf dist && npx shx rm -rf ./src/icons/*.ts",
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-angular/src --templateSrc=../packages/lucide-angular/scripts/exportTemplate --iconFileExtention=.ts --exportFileName=index.ts",
"build:ng": "ng build --prod",
"test:headless": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
"test": "ng test",
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:ng",
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "rm -rf dist && rm -rf ./src/icons/*.ts",
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --iconFileExtention=.ts --exportFileName=index.ts",
"build:ng": "ng build --configuration production",
"test": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
"test:watch": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ngcc"
"version": "pnpm version --git-tag-version=false"
},
"dependencies": {
"tslib": "^2.3.1"
@@ -57,8 +58,10 @@
"ng-packagr": "^11.2.4",
"protractor": "~7.0.0",
"puppeteer": "^8.0.0",
"rxjs": "6.5.3",
"ts-node": "~10.4.0",
"tslint": "~6.1.0",
"typescript": "~4.1.5"
"typescript": "~4.1.5",
"zone.js": "^0.11.7"
}
}

View File

@@ -9,6 +9,7 @@
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"paths": {
"lucide-angular": [
"dist"

View File

@@ -5,6 +5,7 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"enableIvy": true,
"compilationMode": "partial"
}
}

View File

@@ -6,7 +6,7 @@
"main": "src/main.js",
"scripts": {
"dev": "vite",
"build": "tsc && rm -rf dist && yarn build:main && yarn build:worker && yarn build:interface",
"build": "tsc && rm -rf dist && pnpm build:main && pnpm build:worker && pnpm build:interface",
"build:main": "INPUT=main vite build",
"build:worker": "INPUT=worker vite build",
"build:interface": "INPUT=interface vite build",

View File

@@ -0,0 +1,55 @@
import { forwardRef, createElement, SVGProps } from 'react';
import { IconNode } from '../api/fetchIcons';
const defaultAttributes = {
xmlns: 'http://www.w3.org/2000/svg',
width: 24,
height: 24,
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
strokeWidth: 2,
strokeLinecap: 'round',
strokeLinejoin: 'round',
};
export interface LucideProps extends Partial<SVGProps<SVGSVGElement>> {
size?: string | number
}
/**
* Converts string to KebabCase
* Copied from scripts/helper. If anyone knows how to properly import it here
* then please fix it.
*
* @param {string} string
* @returns {string} A kebabized string
*/
export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
const createIconComponent = (iconName: string, iconNode: IconNode) => {
const Component = forwardRef<SVGSVGElement, LucideProps>(
({ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }, ref) =>
createElement(
'svg',
{
ref,
...defaultAttributes,
width: size,
height: size,
stroke: color,
strokeWidth,
className: `lucide lucide-${toKebabCase(iconName)}`,
...rest,
},
[...iconNode.map(([tag, attrs]: [tag:string, attrs: SVGProps<SVGSVGElement>]) => createElement(tag, attrs)), ...([children] || [])],
),
);
Component.displayName = `${iconName}`;
return Component;
};
export default createIconComponent

View File

@@ -1,10 +1,10 @@
import { createReactComponent } from "lucide-react";
import { createElement } from "react";
import { renderToString } from "react-dom/server";
import { IconNode } from "../api/fetchIcons";
import createIconComponent from "./createIconComponent";
const iconNodeToSvg = (iconName: string, iconNode : IconNode) => {
const IconComponent = createReactComponent(iconName, iconNode)
const IconComponent = createIconComponent(iconName, iconNode)
return renderToString(createElement(IconComponent));
}

View File

@@ -1,7 +1,6 @@
import { createReactComponent } from 'lucide-react'
import IconButton from '../components/IconButton'
import SearchInput from '../components/SearchInput'
import createIconComponent from '../helpers/createIconComponent'
import { Icon } from '../hooks/useSearch'
interface PageProps {
@@ -32,7 +31,7 @@ const Icons = ({
<IconButton
name={name}
key={name}
component={createReactComponent(name, iconNode)}
component={createIconComponent(name, iconNode)}
/>
))}
</div>

View File

@@ -1,5 +1,5 @@
import { fetchIcons, LucideIcons } from "../api/fetchIcons"
import { createReactComponent } from 'lucide-react'
import createIconComponent from "../helpers/createIconComponent"
import { renderToString } from 'react-dom/server'
import { createElement } from "react"
@@ -24,7 +24,7 @@ const getSvg = async ({ cachedIcons, iconName, size = 24 }: { cachedIcons: Lucid
const iconNode = cachedIcons.iconNodes[iconName];
if (iconNode) {
const IconComponent = createReactComponent(iconName, iconNode)
const IconComponent = createIconComponent(iconName, iconNode)
const svg = renderToString(createElement(IconComponent, { size }));
parent.postMessage({ pluginMessage: {

View File

@@ -17,7 +17,7 @@
"jsx": "react-jsx",
"typeRoots": [
"./node_modules/@types",
"../../node_modules/@figma"
"./node_modules/@figma"
],
},
"include": ["src"]

View File

@@ -1,15 +0,0 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -1,6 +1,6 @@
name: lucide_icons
description: A Lucide icon library package for Flutter applications. Fork of Feather Icons, open for anyone to contribute icons.
version: 0.82.0
version: 0.92.0
homepage: https://lucide.dev
repository: https://github.com/lucide-icons/lucide

View File

@@ -1,9 +0,0 @@
stats
node_modules
tests
scripts
build
src
babel.config.js
jest.config.js
rollup.config.js

View File

@@ -1,15 +0,0 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -16,7 +16,7 @@ npm install lucide-preact
## How to use
It's build with ESmodules so it's completely threeshakable.
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a preact component.
### Example

View File

@@ -1,7 +1,7 @@
{
"name": "lucide-preact",
"description": "A Lucide icon library package for Preact applications",
"version": "0.82.0",
"version": "0.92.0",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
@@ -17,15 +17,20 @@
"module": "dist/esm/lucide-preact.js",
"unpkg": "dist/umd/lucide-preact.min.js",
"typings": "dist/lucide-preact.d.ts",
"files": [
"dist"
],
"sideEffects": false,
"scripts": {
"build": "yarn clean && yarn build:icons && (yarn build:es & yarn build:types & yarn build:bundles)",
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:es && pnpm build:types && pnpm build:bundles",
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-preact/src --templateSrc=../packages/lucide-preact/scripts/exportTemplate --renderUniqueKey",
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
"build:es": "babel src -d dist/esm",
"build:types": "yarn --cwd ../../ babel-node packages/lucide-preact/scripts/buildTypes.js",
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-preact/rollup.config.js",
"test": "jest"
"build:types": "node ./scripts/buildTypes.mjs",
"build:bundles": "rollup -c ./rollup.config.js",
"test": "jest",
"version": "pnpm version --git-tag-version=false"
},
"devDependencies": {
"@testing-library/preact": "^2.0.1",

View File

@@ -3,9 +3,8 @@ import pkg from './package.json';
const packageName = 'LucidePreact';
const outputFileName = 'lucide-preact';
const rootDir = 'packages/lucide-preact'; // It runs from the root
const outputDir = `${rootDir}/dist`;
const inputs = [`${rootDir}/src/lucide-preact.js`];
const outputDir = 'dist';
const inputs = [`src/lucide-preact.js`];
const bundles = [
{
format: 'umd',

View File

@@ -5,9 +5,11 @@ import {
resetFile,
toPascalCase,
appendFile,
} from '../../../scripts/helpers';
getCurrentDirPath
} from '../../../scripts/helpers.mjs';
const srcDirectory = path.join(__dirname, '../dist');
const currentDir = getCurrentDirPath(import.meta.url)
const srcDirectory = path.join(currentDir, '../dist');
// Declare type definitions
const typeDefinitions = `\
@@ -19,12 +21,13 @@ interface LucideProps extends Partial<Omit<JSX.SVGAttributes, "ref" | "size">> {
ref?: string | ((component: any) => any) | RefObject<any>;
color?: string
size?: string | number
strokeWidth?: string | number
}
// Generated icons
`;
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
const TYPES_FILE = 'lucide-preact.d.ts';
resetFile(TYPES_FILE, srcDirectory);

View File

@@ -1,9 +0,0 @@
stats
node_modules
tests
scripts
build
src
babel.config.js
jest.config.js
rollup.config.js

View File

@@ -1,15 +0,0 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -18,7 +18,7 @@ npm install lucide-react-native
## How to use
It's built with ES modules so it's completely threeshakable.
It's built with ES modules so it's completely tree-shakable.
Each icon can be imported as a react component.
### Example

View File

@@ -19,21 +19,24 @@
"typings": "dist/lucide-react-native.d.ts",
"react-native": "dist/esm/lucide-react-native.js",
"sideEffects": false,
"files": ["dist"],
"scripts": {
"build": "yarn clean && yarn build:icons && yarn build:bundles && yarn build:types",
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundles && pnpm build:types",
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-react-native/src --templateSrc=../packages/lucide-react-native/scripts/exportTemplate --renderUniqueKey",
"build:types": "yarn --cwd ../../ babel-node packages/lucide-react-native/scripts/buildTypes.js",
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-react-native/rollup.config.js",
"test": "jest"
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
"build:types": "node ./scripts/buildTypes.mjs",
"build:bundles": "rollup -c ./rollup.config.js",
"test": "jest",
"version": "pnpm version --git-tag-version=false"
},
"devDependencies": {
"@testing-library/react": "^11.2.6",
"babel-preset-react-app": "^10.0.0",
"jest": "^26.6.3",
"prop-types": "^15.7.2",
"react": "^16.5.1",
"react-dom": "^16.5.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-native": "^0.69.0",
"react-native-svg": "^12.0.0"
},

View File

@@ -3,9 +3,8 @@ import pkg from './package.json';
const packageName = 'LucideReact';
const outputFileName = 'lucide-react-native';
const rootDir = 'packages/lucide-react-native'; // It runs from the root
const outputDir = `${rootDir}/dist`;
const inputs = [`${rootDir}/src/lucide-react-native.js`];
const outputDir = 'dist';
const inputs = ['src/lucide-react-native.js'];
const bundles = [
{
format: 'umd',
@@ -43,6 +42,7 @@ const configs = bundles
...(preserveModules
? {
dir: `${outputDir}/${format}`,
exports: 'auto',
}
: {
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,

View File

@@ -5,9 +5,11 @@ import {
resetFile,
toPascalCase,
writeFile,
} from '../../../scripts/helpers';
getCurrentDirPath
} from '../../../scripts/helpers.mjs';
const srcDirectory = path.join(__dirname, '../dist');
const currentDir = getCurrentDirPath(import.meta.url)
const srcDirectory = path.join(currentDir, '../dist');
// Declare type definitions
const typeDefinitions = `\
@@ -28,7 +30,7 @@ export type Icon = React.FC<LucideProps>;
// Generated icons
`;
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
const TYPES_FILE = 'lucide-react-native.d.ts';
resetFile(TYPES_FILE, srcDirectory);

View File

@@ -1,9 +0,0 @@
stats
node_modules
tests
scripts
build
src
babel.config.js
jest.config.js
rollup.config.js

View File

@@ -1,15 +0,0 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -16,7 +16,7 @@ npm install lucide-react
## How to use
It's built with ES modules so it's completely threeshakable.
It's built with ES modules so it's completely tree-shakable.
Each icon can be imported as a react component.
### Example

View File

@@ -1,7 +1,7 @@
{
"name": "lucide-react",
"description": "A Lucide icon library package for React applications",
"version": "0.82.0",
"version": "0.92.0",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
@@ -18,22 +18,27 @@
"unpkg": "dist/umd/lucide-react.min.js",
"typings": "dist/lucide-react.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"build": "yarn clean && yarn build:icons && (yarn build:es & yarn build:types & yarn build:bundles)",
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:es && pnpm build:types && pnpm build:bundles",
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-react/src --templateSrc=../packages/lucide-react/scripts/exportTemplate --renderUniqueKey",
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
"build:es": "babel src -d dist/esm",
"build:types": "yarn --cwd ../../ babel-node packages/lucide-react/scripts/buildTypes.js",
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-react/rollup.config.js",
"test": "jest"
"build:types": "node ./scripts/buildTypes.mjs",
"build:bundles": "rollup -c ./rollup.config.js",
"test": "jest",
"version": "pnpm version --git-tag-version=false"
},
"devDependencies": {
"@testing-library/react": "^11.2.6",
"babel-preset-react-app": "^10.0.0",
"jest": "^26.6.3",
"prop-types": "^15.7.2",
"react": "^16.5.1",
"react-dom": "^17.0.2"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"peerDependencies": {
"prop-types": "^15.7.2",

View File

@@ -3,9 +3,8 @@ import pkg from './package.json';
const packageName = 'LucideReact';
const outputFileName = 'lucide-react';
const rootDir = 'packages/lucide-react'; // It runs from the root
const outputDir = `${rootDir}/dist`;
const inputs = [`${rootDir}/src/lucide-react.js`];
const outputDir = `dist`;
const inputs = [`src/lucide-react.js`];
const bundles = [
{
format: 'umd',

View File

@@ -5,9 +5,11 @@ import {
resetFile,
toPascalCase,
writeFile,
} from '../../../scripts/helpers';
getCurrentDirPath
} from '../../../scripts/helpers.mjs';
const srcDirectory = path.join(__dirname, '../dist');
const currentDir = getCurrentDirPath(import.meta.url)
const srcDirectory = path.join(currentDir, '../dist');
// Declare type definitions
const typeDefinitions = `\
@@ -28,7 +30,7 @@ export type Icon = React.FC<LucideProps>;
// Generated icons
`;
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
const TYPES_FILE = 'lucide-react.d.ts';
resetFile(TYPES_FILE, srcDirectory);

View File

@@ -0,0 +1,78 @@
# Lucide Solid
Implementation of the lucide icon library for solid applications.
> What is lucide? Read it [here](https://github.com/lucide-icons/lucide#what-is-lucide).
## Installation
```sh
yarn add lucide-solid
# or
npm install lucide-solid
```
## How to use
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a solid component.
### Example
You can pass additional props to adjust the icon.
``` js
import { Camera } from 'lucide-solid';
// Returns SolidComponent
// Usage
const App = () => {
return <Camera color="red" size={48}/>
};
export default App;
```
### Props
| name | type | default
| ------------ | -------- | --------
| `size` | *Number* | 24
| `color` | *String* | currentColor
| `strokeWidth`| *Number* | 2
### Custom props / svg attributes
You can also pass custom props that will be added in the as attributes. With that you can modify the icons look by passing svg attributes.
``` js
// Usage
const App = () => {
return <Camera fill="red" stroke-linejoin="bevel"/>
};
```
### One generic icon component
It is possible to create one generic icon component to load icons.
> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
#### Icon Component Example
``` tsx
import * as icons from 'lucide-solid';
import type { LucideProps } from 'lucide-solid';
import { splitProps } from 'solid-js';
import { Dynamic } from 'solid-js/web';
const Icon = (props: { name: keyof typeof icons } & LucideProps) => {
const [local, others] = splitProps(props, ["name"]);
return <Dynamic component={icons[local.name]} {...others} />
};
export default Icon;
```

View File

@@ -0,0 +1,6 @@
const mainConfig = require('../../babel.config');
module.exports = {
presets: ['solid'],
env: mainConfig.env,
};

View File

@@ -0,0 +1,51 @@
{
"name": "lucide-solid",
"description": "A Lucide icon library package for Solid applications",
"version": "0.88.0-beta.3",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
"repository": {
"type": "git",
"url": "https://github.com/lucide-icons/lucide.git",
"directory": "packages/lucide-solid"
},
"author": "Eric Fennis",
"amdName": "lucide-solid",
"main": "dist/cjs/lucide-solid.js",
"main:umd": "dist/umd/lucide-solid.js",
"module": "dist/esm/lucide-solid.js",
"unpkg": "dist/umd/lucide-solid.min.js",
"typings": "dist/lucide-solid.d.ts",
"files": [
"dist"
],
"sideEffects": false,
"scripts": {
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:es && pnpm build:types && pnpm build:bundles",
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
"build:es": "babel src -d dist/esm",
"build:types": "node ./scripts/buildTypes.mjs",
"build:bundles": "rollup -c ./rollup.config.js",
"test:jest": "jest",
"test": "vitest",
"version": "pnpm version --git-tag-version=false"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"babel-preset-solid": "^1.5.4",
"jest": "^26.6.3",
"jsdom": "^20.0.0",
"solid-js": "^1.4.7",
"solid-testing-library": "^0.3.0",
"solid-jest": "^0.2.0",
"vite": "^2.6.4",
"vite-plugin-solid": "^2.3.0",
"vitest": "^0.23.2"
},
"peerDependencies": {
"solid-js": "^1.4.7"
}
}

View File

@@ -0,0 +1,47 @@
import plugins from '../../rollup.plugins';
import pkg from './package.json';
const packageName = 'LucideSolid';
const outputFileName = 'lucide-solid';
const outputDir = 'dist';
const inputs = [`src/lucide-solid.js`];
const bundles = [
{
format: 'umd',
inputs,
outputDir,
minify: true,
},
{
format: 'umd',
inputs,
outputDir,
},
{
format: 'cjs',
inputs,
outputDir,
},
];
const configs = bundles
.map(({ inputs, outputDir, format, minify }) =>
inputs.map(input => ({
input,
plugins: plugins(pkg, minify),
external: ['solid-js', 'solid-js/h'],
output: {
name: packageName,
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
format,
sourcemap: true,
globals: {
'solid-js': 'solid-js',
'solid-js/h': 'solid-js/h',
},
},
})),
)
.flat();
export default configs;

View File

@@ -0,0 +1,47 @@
import path from 'path';
import {
writeFile,
readSvgDirectory,
resetFile,
toPascalCase,
appendFile,
getCurrentDirPath
} from '../../../scripts/helpers.mjs';
const currentDir = getCurrentDirPath(import.meta.url)
const srcDirectory = path.join(currentDir, '../dist');
// Declare type definitions
const typeDefinitions = `\
/// <reference types="solid-js" />
import { JSX } from 'solid-js'
interface LucideProps extends Partial<JSX.IntrinsicElements & JSX.SvgSVGAttributes<SVGSVGElement>> {
key?: string | number;
ref?: string | ((component: any) => any);
color?: string
size?: string | number
strokeWidth?: string | number
class?: string
}
// Generated icons
`;
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
const TYPES_FILE = 'lucide-solid.d.ts';
resetFile(TYPES_FILE, srcDirectory);
writeFile(typeDefinitions, TYPES_FILE, srcDirectory);
const svgFiles = readSvgDirectory(ICONS_DIR);
svgFiles.forEach(svgFile => {
const iconName = path.basename(svgFile, '.svg');
const componentName = toPascalCase(iconName);
const exportTypeString = `export declare const ${componentName}: (props: LucideProps) => JSX.Element;\n`;
appendFile(exportTypeString, TYPES_FILE, srcDirectory);
});
console.log(`Generated ${TYPES_FILE} file with`, svgFiles.length, 'icons');

View File

@@ -0,0 +1,7 @@
export default ({ componentName, children }) => `
import createSolidComponent from '../createSolidComponent';
const ${componentName} = createSolidComponent('${componentName}', ${JSON.stringify(children)});
export default ${componentName};
`;

View File

@@ -0,0 +1,47 @@
import h from 'solid-js/h';
import { splitProps } from 'solid-js';
import defaultAttributes from './defaultAttributes';
/**
* Converts string to KebabCase
* Copied from scripts/helper. If anyone knows how to properly import it here
* then please fix it.
*
* @param {string} string
* @returns {string} A kebabized string
*/
export const toKebabCase = string => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
export default (iconName, iconNode) => {
const Component = props => {
const [localProps, rest] = splitProps(props, [
'color',
'size',
'strokeWidth',
'children',
'class',
]);
const svgProps = {
...defaultAttributes,
width: () => (localProps.size != null ? localProps.size : defaultAttributes.width),
height: () => (localProps.size != null ? localProps.size : defaultAttributes.height),
stroke: () => (localProps.color != null ? localProps.color : defaultAttributes.stroke),
'stroke-width': () =>
localProps.strokeWidth != null ? localProps.strokeWidth : defaultAttributes['stroke-width'],
class: () =>
`lucide lucide-${toKebabCase(iconName)} ${
localProps.class != null ? localProps.class : ''
}`,
};
return h(
'svg',
[svgProps, rest],
[...iconNode.map(([tag, attrs]) => h(tag, attrs)), localProps.children],
);
};
Component.displayName = `${iconName}`;
return Component;
};

View File

@@ -0,0 +1,11 @@
export default {
xmlns: 'http://www.w3.org/2000/svg',
width: 24,
height: 24,
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
'stroke-width': 2,
'stroke-linecap': 'round',
'stroke-linejoin': 'round',
};

View File

@@ -0,0 +1 @@
Folder for generated icons

View File

@@ -0,0 +1 @@
export * from './icons';

View File

@@ -0,0 +1,5 @@
// Vitest Snapshot v1
exports[`Using lucide icon components > should adjust the size, stroke color and stroke width 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"48\\" height=\\"48\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"red\\" stroke-width=\\"4\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" class=\\"lucide lucide-grid \\" data-testid=\\"grid-icon\\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\" key=\\"maln0c\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\" key=\\"1uch6j\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\" key=\\"1xojw2\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\" key=\\"nvcl17\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\" key=\\"jcv93v\\"></line></svg>"`;
exports[`Using lucide icon components > should render an component 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"currentColor\\" stroke-width=\\"2\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" class=\\"lucide lucide-grid \\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\" key=\\"maln0c\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\" key=\\"1uch6j\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\" key=\\"1xojw2\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\" key=\\"nvcl17\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\" key=\\"jcv93v\\"></line></svg>"`;

View File

@@ -0,0 +1,30 @@
import { describe, it, expect } from 'vitest';
import { render } from 'solid-testing-library'
import { Grid } from '../src/icons'
describe('Using lucide icon components', () => {
it('should render an component', () => {
const { container } = render(() => <Grid/> );
expect( container.innerHTML ).toMatchSnapshot();
});
it('should adjust the size, stroke color and stroke width', async () => {
const testId = 'grid-icon';
const { container, getByTestId } = render( () =>
<Grid
data-testid={testId}
size={48}
stroke="red"
strokeWidth={4}
/>,
);
const { attributes } = await getByTestId(testId) as unknown as{ attributes: Record<string, { value: string }>};
expect(attributes.stroke.value).toBe('red');
expect(attributes.width.value).toBe('48');
expect(attributes.height.value).toBe('48');
expect(attributes['stroke-width'].value).toBe('4');
expect( container.innerHTML ).toMatchSnapshot();
});
})

View File

@@ -0,0 +1 @@
import '@testing-library/jest-dom';

Some files were not shown because too many files have changed in this diff Show More