Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3196af66ce | ||
|
|
dd593e3dc3 | ||
|
|
d4fe0470ae | ||
|
|
318c024589 | ||
|
|
bd8b669666 | ||
|
|
89baeeeb63 | ||
|
|
9fbec87eb0 |
36
.github/workflows/ci.yml
vendored
@@ -14,15 +14,33 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
- uses: actions/setup-node@v3.4.1
|
||||||
|
|
||||||
- name: Setup node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Fetch tags
|
||||||
run: git fetch --all --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`)"
|
run: echo "::set-output name=LATEST_TAG::$(git describe --tags `git rev-list --tags --max-count=1`)"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Check if we can patch
|
- name: Check if we can patch
|
||||||
run: .github/workflows/version-up.sh --minor
|
run: .github/workflows/version-up.sh --minor
|
||||||
@@ -44,7 +62,7 @@ jobs:
|
|||||||
- name: Create change log
|
- name: Create change log
|
||||||
id: change-log
|
id: change-log
|
||||||
run: |
|
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//'%'/'%25'}"
|
||||||
CHANGE_LOG="${CHANGE_LOG//$'\n'/'%0A'}"
|
CHANGE_LOG="${CHANGE_LOG//$'\n'/'%0A'}"
|
||||||
CHANGE_LOG="${CHANGE_LOG//$'\r'/'%0D'}"
|
CHANGE_LOG="${CHANGE_LOG//$'\r'/'%0D'}"
|
||||||
|
|||||||
48
.github/workflows/lucide-angular.yml
vendored
Normal 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
@@ -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
|
||||||
|
|
||||||
48
.github/workflows/lucide-react-native.yml
vendored
Normal 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
@@ -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
|
||||||
|
|
||||||
45
.github/workflows/lucide-static.yml
vendored
Normal 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
@@ -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
@@ -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
@@ -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
@@ -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
|
||||||
|
|
||||||
351
.github/workflows/release.yml
vendored
@@ -13,7 +13,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-build:
|
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
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
@@ -33,30 +33,47 @@ jobs:
|
|||||||
needs: pre-build
|
needs: pre-build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set new version
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide build
|
run: pnpm --filter lucide build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide test
|
run: pnpm --filter lucide test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide publish
|
run: pnpm --filter lucide publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -71,30 +88,47 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide-react build
|
run: pnpm --filter lucide-react build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide-react test
|
run: pnpm --filter lucide-react test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-react publish
|
run: pnpm --filter lucide-react publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -109,30 +143,47 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide-react-native build
|
run: pnpm --filter lucide-react-native build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide-react-native test
|
run: pnpm --filter lucide-react-native test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-react-native publish
|
run: pnpm --filter lucide-react-native publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -147,30 +198,47 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set new version
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide-vue build
|
run: pnpm --filter lucide-vue build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide-vue test
|
run: pnpm --filter lucide-vue test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-vue publish
|
run: pnpm --filter lucide-vue publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -185,30 +253,47 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set new version
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide-vue-next build
|
run: pnpm --filter lucide-vue-next build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide-vue-next test
|
run: pnpm --filter lucide-vue-next test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-vue-next publish
|
run: pnpm --filter lucide-vue-next publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -223,30 +308,47 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide-angular build
|
run: pnpm --filter lucide-angular build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide-angular test:headless
|
run: pnpm --filter lucide-angular test:headless
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-angular publish dist
|
run: pnpm --filter lucide-angular publish dist --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -261,30 +363,47 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide-preact build
|
run: pnpm --filter lucide-preact build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide-preact test
|
run: pnpm --filter lucide-preact test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-preact publish
|
run: pnpm --filter lucide-preact publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -299,30 +418,47 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
- 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
|
- name: Build
|
||||||
run: yarn workspace lucide-svelte build
|
run: pnpm --filter lucide-svelte build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn workspace lucide-svelte test
|
run: pnpm --filter lucide-svelte test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-svelte publish
|
run: pnpm --filter lucide-svelte publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -338,30 +474,47 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
|
|
||||||
- name: Setup node
|
- uses: actions/setup-node@v3.4.1
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set new version
|
- 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
|
- name: Move Font
|
||||||
run: cp -r lucide-font packages/lucide-static/font
|
run: cp -r lucide-font packages/lucide-static/font
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn workspace lucide-static build
|
run: pnpm --filter lucide-static build
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: yarn workspace lucide-static publish
|
run: pnpm --filter lucide-static publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
- name: Upload package.json
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -375,13 +528,29 @@ jobs:
|
|||||||
needs: pre-build
|
needs: pre-build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v3.4.1
|
||||||
- name: Setup node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
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
|
- name: Install FontForge
|
||||||
run: sudo apt-get install zlib1g-dev fontforge
|
run: sudo apt-get install zlib1g-dev fontforge
|
||||||
@@ -407,13 +576,13 @@ jobs:
|
|||||||
- name: Install Font Custom dependency
|
- name: Install Font Custom dependency
|
||||||
run: sudo gem install fontcustom
|
run: sudo gem install fontcustom
|
||||||
|
|
||||||
- name: Install
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm install
|
||||||
|
|
||||||
- name: Build Icon Font
|
- name: Build Icon Font
|
||||||
run: |
|
run: |
|
||||||
mkdir lucide-font
|
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"
|
- name: "Upload to Artifacts"
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
@@ -474,6 +643,10 @@ jobs:
|
|||||||
run: flutter test
|
run: flutter test
|
||||||
working-directory: packages/lucide-flutter
|
working-directory: packages/lucide-flutter
|
||||||
|
|
||||||
|
- name: Copy License
|
||||||
|
run: cp ../../LICENSE ./LICENSE
|
||||||
|
working-directory: packages/lucide-flutter
|
||||||
|
|
||||||
- name: Update yaml
|
- name: Update yaml
|
||||||
run: sed -E 's/(version:)[^\n]*/\1 ${{ needs.pre-build.outputs.VERSION }}/;' pubspec.yaml > pubspec && mv pubspec pubspec.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
|
working-directory: packages/lucide-flutter
|
||||||
|
|||||||
36
.github/workflows/test-lucide-svelte.yml
vendored
@@ -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
|
|
||||||
|
|
||||||
36
.github/workflows/test-lucide-vue-next.yml
vendored
@@ -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
|
|
||||||
|
|
||||||
36
.github/workflows/test-lucide-vue.yml
vendored
@@ -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
@@ -14,3 +14,4 @@ stats
|
|||||||
*.log
|
*.log
|
||||||
packages/**/src/icons/*.js
|
packages/**/src/icons/*.js
|
||||||
packages/**/src/icons/*.ts
|
packages/**/src/icons/*.ts
|
||||||
|
packages/**/LICENSE
|
||||||
|
|||||||
@@ -75,13 +75,13 @@ After cloning the project you need to run:
|
|||||||
yarn # Install dependencies, including the workspace packages
|
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.
|
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
|
### 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.
|
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
|
```sh
|
||||||
yarn [package-name] build
|
pnpm [package-name] build
|
||||||
|
|
||||||
#example:
|
#example:
|
||||||
|
|
||||||
yarn lucide-react build
|
pnpm lucide-react build
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Testing
|
#### 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.
|
Run unit tests with jest for each package to make sure all the package apis still works as expected.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn [package-name] test
|
pnpm [package-name] test
|
||||||
|
|
||||||
#example:
|
#example:
|
||||||
|
|
||||||
yarn lucide-vue test
|
pnpm lucide-vue test
|
||||||
```
|
```
|
||||||
|
|
||||||
Recommended to run the test watcher when making changes.
|
Recommended to run the test watcher when making changes.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn [package-name] test:watch
|
pnpm [package-name] test:watch
|
||||||
|
|
||||||
#example:
|
#example:
|
||||||
|
|
||||||
yarn lucide-preact test:watch
|
pnpm lucide-preact test:watch
|
||||||
```
|
```
|
||||||
|
|
||||||
### Unit Testing
|
### Unit Testing
|
||||||
@@ -131,15 +131,17 @@ When adding new features to for example the icon component for a framework. It i
|
|||||||
|
|
||||||
### Local Testing
|
### Local Testing
|
||||||
|
|
||||||
To test changes in a local project, you can use `yarn link` 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
|
```sh
|
||||||
# in packages/lucide-react
|
# in packages/lucide-react
|
||||||
yarn link
|
|
||||||
|
npm run build &&
|
||||||
|
npm link
|
||||||
|
|
||||||
# in your local project
|
# in your local project
|
||||||
|
|
||||||
yarn link lucide-react
|
npm link lucide-react
|
||||||
```
|
```
|
||||||
|
|
||||||
## Project Structure
|
## 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.
|
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
|
### scripts
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ You can pass additional props to adjust the icon.
|
|||||||
import { Camera } from 'lucide-svelte'
|
import { Camera } from 'lucide-svelte'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Camera />
|
<Camera color="#ff3e98" />
|
||||||
```
|
```
|
||||||
|
|
||||||
### Available props
|
### Available props
|
||||||
|
|||||||
16
icons/concierge-bell.svg
Normal 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 |
14
icons/fan.svg
Normal 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 |
17
icons/microwave.svg
Normal 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 |
13
icons/rectangle-horizontal.svg
Normal 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 |
13
icons/rectangle-vertical.svg
Normal 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
@@ -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 |
22
icons/shower-head.svg
Normal 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 |
112
package.json
@@ -1,85 +1,56 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"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": {
|
"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",
|
"build": "pnpm -r --filter './packages/**' build",
|
||||||
"test": "yarn lucide build:icons && yarn lucide-react build:icons && yarn lucide-vue build:icons && jest",
|
"test": "pnpm -r --filter './packages/**' test",
|
||||||
"lucide": "yarn workspace lucide",
|
"lucide": "pnpm --filter lucide",
|
||||||
"lucide-angular": "yarn workspace lucide-angular",
|
"lucide-angular": "pnpm --filter lucide-angular",
|
||||||
"lucide-react": "yarn workspace lucide-react",
|
"lucide-react": "pnpm --filter lucide-react",
|
||||||
"lucide-react-native": "yarn workspace lucide-react-native",
|
"lucide-react-native": "pnpm --filter lucide-react-native",
|
||||||
"lucide-preact": "yarn workspace lucide-preact",
|
"lucide-preact": "pnpm --filter lucide-preact",
|
||||||
"lucide-vue": "yarn workspace lucide-vue",
|
"lucide-vue": "pnpm --filter lucide-vue",
|
||||||
"lucide-vue-next": "yarn workspace lucide-vue-next",
|
"lucide-vue-next": "pnpm --filter lucide-vue-next",
|
||||||
"lucide-svelte": "yarn workspace lucide-svelte",
|
"lucide-svelte": "pnpm --filter lucide-svelte",
|
||||||
"lucide-static": "yarn workspace lucide-static",
|
"lucide-static": "pnpm --filter lucide-static",
|
||||||
"build:icons": "babel-node ./scripts/buildIcons.js --presets @babel/env",
|
"build:icons": "node ./scripts/buildIcons.mjs --templateSrc ./packages/lucide/scripts/exportTemplate.mjs",
|
||||||
"build:outline-icons": "babel-node ./scripts/outlineSvg.js --presets @babel/env",
|
"build:outline-icons": "node ./scripts/outlineSvg.mjs",
|
||||||
"generate:supersprite": "babel-node ./scripts/generateSuperSVG.js",
|
"generate:supersprite": "node ./scripts/generateSuperSVG.mjs",
|
||||||
"optimize": "esbuild ./scripts/optimizeSvgs.js --bundle --platform=node | node",
|
"optimize": "node ./scripts/optimizeSvgs.mjs",
|
||||||
"addtags": "babel-node ./scripts/addMissingKeysToTags.js --presets @babel/env",
|
"addtags": "node ./scripts/addMissingKeysToTags.mjs",
|
||||||
"generate:changelog": "babel-node ./scripts/generateChangelog.js --presets @babel/env"
|
"generate:changelog": "node ./scripts/generateChangelog.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ampproject/rollup-plugin-closure-compiler": "^0.25.2",
|
|
||||||
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.18.9",
|
||||||
"@babel/core": "^7.11.1",
|
"@babel/core": "^7.18.9",
|
||||||
"@babel/node": "^7.13.10",
|
"@babel/node": "^7.18.9",
|
||||||
"@babel/plugin-transform-runtime": "^7.11.5",
|
"@babel/plugin-transform-runtime": "^7.18.9",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.18.9",
|
||||||
"@rollup/plugin-babel": "^5.0.0",
|
"@rollup/plugin-babel": "^5.3.1",
|
||||||
"@rollup/plugin-commonjs": "^17.1.0",
|
"@rollup/plugin-commonjs": "^17.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^11.2.0",
|
"@rollup/plugin-node-resolve": "^11.2.1",
|
||||||
"@rollup/plugin-replace": "^2.4.1",
|
"@rollup/plugin-replace": "^2.4.2",
|
||||||
"babel-jest": "^26.6.3",
|
"babel-jest": "^26.6.3",
|
||||||
"babel-plugin-add-import-extension": "^1.4.3",
|
"babel-plugin-add-import-extension": "^1.6.0",
|
||||||
"core-js": "3",
|
"core-js": "^3.24.0",
|
||||||
"esbuild": "^0.14.28",
|
"esbuild": "^0.14.51",
|
||||||
"eslint": "^4.19.1",
|
"eslint": "^4.19.1",
|
||||||
"eslint-config-airbnb-base": "^12.1.0",
|
"eslint-config-airbnb-base": "^12.1.0",
|
||||||
"eslint-config-prettier": "^2.9.0",
|
"eslint-config-prettier": "^2.10.0",
|
||||||
"eslint-plugin-import": "^2.5.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-prettier": "^2.5.0",
|
"eslint-plugin-prettier": "^2.7.0",
|
||||||
"husky": "^4.3.6",
|
"husky": "^4.3.8",
|
||||||
"jest": "^26.4.2",
|
"jest": "^28.1.3",
|
||||||
"lint-staged": "^10.5.3",
|
"lint-staged": "^10.5.4",
|
||||||
"minimist": "^1.2.6",
|
"minimist": "^1.2.6",
|
||||||
"node-fetch": "^2.6.7",
|
"node-fetch": "^2.6.7",
|
||||||
"prettier": "1.17.1",
|
"prettier": "1.17.1",
|
||||||
"rollup": "^2.7.3",
|
"rollup": "^2.77.2",
|
||||||
"rollup-plugin-license": "^2.0.0",
|
"rollup-plugin-license": "^2.8.1",
|
||||||
"rollup-plugin-svelte": "^7.1.0",
|
"rollup-plugin-svelte": "^7.1.0",
|
||||||
"rollup-plugin-terser": "^5.2.0",
|
"rollup-plugin-terser": "^5.3.1",
|
||||||
"rollup-plugin-visualizer": "^4.1.0",
|
"rollup-plugin-visualizer": "^4.2.2",
|
||||||
|
"@rollup/plugin-typescript": "^8.3.4",
|
||||||
"svg-outline-stroke": "^1.3.1",
|
"svg-outline-stroke": "^1.3.1",
|
||||||
"svgo": "^2.8.0",
|
"svgo": "^2.8.0",
|
||||||
"svgson": "^4.1.0"
|
"svgson": "^4.1.0"
|
||||||
@@ -90,7 +61,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"icons/*.svg": "npx babel-node ./scripts/optimizeStagedSvgs.js --presets @babel/env"
|
"icons/*.svg": "node ./scripts/optimizeStagedSvgs.mjs"
|
||||||
},
|
}
|
||||||
"dependencies": {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "lucide-angular",
|
"name": "lucide-angular",
|
||||||
"description": "A Lucide icon library package for Angular applications",
|
"description": "A Lucide icon library package for Angular applications",
|
||||||
"version": "0.83.0",
|
"version": "0.84.0",
|
||||||
"author": "SMAH1",
|
"author": "SMAH1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"homepage": "https://lucide.dev",
|
"homepage": "https://lucide.dev",
|
||||||
@@ -22,12 +22,13 @@
|
|||||||
"Font Awesome"
|
"Font Awesome"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn clean && yarn build:icons && yarn build:ng",
|
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:ng",
|
||||||
"clean": "npx shx rm -rf dist && npx shx rm -rf ./src/icons/*.ts",
|
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||||
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-angular/src --templateSrc=../packages/lucide-angular/scripts/exportTemplate --iconFileExtention=.ts --exportFileName=index.ts",
|
"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 --prod",
|
"build:ng": "ng build --prod",
|
||||||
"test:headless": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
|
"test": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
|
||||||
"test": "ng test",
|
"test:watch": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e",
|
||||||
"postinstall": "ngcc"
|
"postinstall": "ngcc"
|
||||||
@@ -57,8 +58,10 @@
|
|||||||
"ng-packagr": "^11.2.4",
|
"ng-packagr": "^11.2.4",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"puppeteer": "^8.0.0",
|
"puppeteer": "^8.0.0",
|
||||||
|
"rxjs": "6.5.3",
|
||||||
"ts-node": "~10.4.0",
|
"ts-node": "~10.4.0",
|
||||||
"tslint": "~6.1.0",
|
"tslint": "~6.1.0",
|
||||||
"typescript": "~4.1.5"
|
"typescript": "~4.1.5",
|
||||||
|
"zone.js": "^0.11.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"downlevelIteration": true,
|
"downlevelIteration": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"lucide-angular": [
|
"lucide-angular": [
|
||||||
"dist"
|
"dist"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"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:main": "INPUT=main vite build",
|
||||||
"build:worker": "INPUT=worker vite build",
|
"build:worker": "INPUT=worker vite build",
|
||||||
"build:interface": "INPUT=interface vite build",
|
"build:interface": "INPUT=interface vite build",
|
||||||
|
|||||||
55
packages/lucide-figma/src/helpers/createIconComponent.ts
Normal 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
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import { createReactComponent } from "lucide-react";
|
|
||||||
import { createElement } from "react";
|
import { createElement } from "react";
|
||||||
import { renderToString } from "react-dom/server";
|
import { renderToString } from "react-dom/server";
|
||||||
import { IconNode } from "../api/fetchIcons";
|
import { IconNode } from "../api/fetchIcons";
|
||||||
|
import createIconComponent from "./createIconComponent";
|
||||||
|
|
||||||
const iconNodeToSvg = (iconName: string, iconNode : IconNode) => {
|
const iconNodeToSvg = (iconName: string, iconNode : IconNode) => {
|
||||||
const IconComponent = createReactComponent(iconName, iconNode)
|
const IconComponent = createIconComponent(iconName, iconNode)
|
||||||
return renderToString(createElement(IconComponent));
|
return renderToString(createElement(IconComponent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { createReactComponent } from 'lucide-react'
|
|
||||||
|
|
||||||
import IconButton from '../components/IconButton'
|
import IconButton from '../components/IconButton'
|
||||||
import SearchInput from '../components/SearchInput'
|
import SearchInput from '../components/SearchInput'
|
||||||
|
import createIconComponent from '../helpers/createIconComponent'
|
||||||
import { Icon } from '../hooks/useSearch'
|
import { Icon } from '../hooks/useSearch'
|
||||||
|
|
||||||
interface PageProps {
|
interface PageProps {
|
||||||
@@ -32,7 +31,7 @@ const Icons = ({
|
|||||||
<IconButton
|
<IconButton
|
||||||
name={name}
|
name={name}
|
||||||
key={name}
|
key={name}
|
||||||
component={createReactComponent(name, iconNode)}
|
component={createIconComponent(name, iconNode)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { fetchIcons, LucideIcons } from "../api/fetchIcons"
|
import { fetchIcons, LucideIcons } from "../api/fetchIcons"
|
||||||
import { createReactComponent } from 'lucide-react'
|
import createIconComponent from "../helpers/createIconComponent"
|
||||||
import { renderToString } from 'react-dom/server'
|
import { renderToString } from 'react-dom/server'
|
||||||
import { createElement } from "react"
|
import { createElement } from "react"
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ const getSvg = async ({ cachedIcons, iconName, size = 24 }: { cachedIcons: Lucid
|
|||||||
const iconNode = cachedIcons.iconNodes[iconName];
|
const iconNode = cachedIcons.iconNodes[iconName];
|
||||||
|
|
||||||
if (iconNode) {
|
if (iconNode) {
|
||||||
const IconComponent = createReactComponent(iconName, iconNode)
|
const IconComponent = createIconComponent(iconName, iconNode)
|
||||||
const svg = renderToString(createElement(IconComponent, { size }));
|
const svg = renderToString(createElement(IconComponent, { size }));
|
||||||
|
|
||||||
parent.postMessage({ pluginMessage: {
|
parent.postMessage({ pluginMessage: {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"./node_modules/@types",
|
"./node_modules/@types",
|
||||||
"../../node_modules/@figma"
|
"./node_modules/@figma"
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
|
|||||||
@@ -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.
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
name: lucide_icons
|
name: lucide_icons
|
||||||
description: A Lucide icon library package for Flutter applications. Fork of Feather Icons, open for anyone to contribute icons.
|
description: A Lucide icon library package for Flutter applications. Fork of Feather Icons, open for anyone to contribute icons.
|
||||||
version: 0.83.0
|
version: 0.84.0
|
||||||
homepage: https://lucide.dev
|
homepage: https://lucide.dev
|
||||||
repository: https://github.com/lucide-icons/lucide
|
repository: https://github.com/lucide-icons/lucide
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
stats
|
|
||||||
node_modules
|
|
||||||
tests
|
|
||||||
scripts
|
|
||||||
build
|
|
||||||
src
|
|
||||||
babel.config.js
|
|
||||||
jest.config.js
|
|
||||||
rollup.config.js
|
|
||||||
@@ -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.
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "lucide-preact",
|
"name": "lucide-preact",
|
||||||
"description": "A Lucide icon library package for Preact applications",
|
"description": "A Lucide icon library package for Preact applications",
|
||||||
"version": "0.83.0",
|
"version": "0.84.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"homepage": "https://lucide.dev",
|
"homepage": "https://lucide.dev",
|
||||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||||
@@ -17,14 +17,16 @@
|
|||||||
"module": "dist/esm/lucide-preact.js",
|
"module": "dist/esm/lucide-preact.js",
|
||||||
"unpkg": "dist/umd/lucide-preact.min.js",
|
"unpkg": "dist/umd/lucide-preact.min.js",
|
||||||
"typings": "dist/lucide-preact.d.ts",
|
"typings": "dist/lucide-preact.d.ts",
|
||||||
|
"files": ["dist"],
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn clean && yarn build:icons && (yarn build:es & yarn build:types & yarn build:bundles)",
|
"build": "pnpm clean && pnpm copy:license && 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",
|
"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:es": "babel src -d dist/esm",
|
||||||
"build:types": "yarn --cwd ../../ babel-node packages/lucide-preact/scripts/buildTypes.js",
|
"build:types": "node ./scripts/buildTypes.mjs",
|
||||||
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-preact/rollup.config.js",
|
"build:bundles": "rollup -c ./rollup.config.js",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import pkg from './package.json';
|
|||||||
|
|
||||||
const packageName = 'LucidePreact';
|
const packageName = 'LucidePreact';
|
||||||
const outputFileName = 'lucide-preact';
|
const outputFileName = 'lucide-preact';
|
||||||
const rootDir = 'packages/lucide-preact'; // It runs from the root
|
const outputDir = 'dist';
|
||||||
const outputDir = `${rootDir}/dist`;
|
const inputs = [`src/lucide-preact.js`];
|
||||||
const inputs = [`${rootDir}/src/lucide-preact.js`];
|
|
||||||
const bundles = [
|
const bundles = [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import {
|
|||||||
resetFile,
|
resetFile,
|
||||||
toPascalCase,
|
toPascalCase,
|
||||||
appendFile,
|
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
|
// Declare type definitions
|
||||||
const typeDefinitions = `\
|
const typeDefinitions = `\
|
||||||
@@ -24,7 +26,7 @@ interface LucideProps extends Partial<Omit<JSX.SVGAttributes, "ref" | "size">> {
|
|||||||
// Generated icons
|
// Generated icons
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
|
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||||
const TYPES_FILE = 'lucide-preact.d.ts';
|
const TYPES_FILE = 'lucide-preact.d.ts';
|
||||||
|
|
||||||
resetFile(TYPES_FILE, srcDirectory);
|
resetFile(TYPES_FILE, srcDirectory);
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
stats
|
|
||||||
node_modules
|
|
||||||
tests
|
|
||||||
scripts
|
|
||||||
build
|
|
||||||
src
|
|
||||||
babel.config.js
|
|
||||||
jest.config.js
|
|
||||||
rollup.config.js
|
|
||||||
@@ -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.
|
|
||||||
@@ -19,12 +19,14 @@
|
|||||||
"typings": "dist/lucide-react-native.d.ts",
|
"typings": "dist/lucide-react-native.d.ts",
|
||||||
"react-native": "dist/esm/lucide-react-native.js",
|
"react-native": "dist/esm/lucide-react-native.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"files": ["dist"],
|
||||||
"scripts": {
|
"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",
|
"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:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
|
||||||
"build:types": "yarn --cwd ../../ babel-node packages/lucide-react-native/scripts/buildTypes.js",
|
"build:types": "node ./scripts/buildTypes.mjs",
|
||||||
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-react-native/rollup.config.js",
|
"build:bundles": "rollup -c ./rollup.config.js",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,8 +34,8 @@
|
|||||||
"babel-preset-react-app": "^10.0.0",
|
"babel-preset-react-app": "^10.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react": "^16.5.1",
|
"react": "^18.0.0",
|
||||||
"react-dom": "^16.5.1",
|
"react-dom": "^18.0.0",
|
||||||
"react-native": "^0.69.0",
|
"react-native": "^0.69.0",
|
||||||
"react-native-svg": "^12.0.0"
|
"react-native-svg": "^12.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import pkg from './package.json';
|
|||||||
|
|
||||||
const packageName = 'LucideReact';
|
const packageName = 'LucideReact';
|
||||||
const outputFileName = 'lucide-react-native';
|
const outputFileName = 'lucide-react-native';
|
||||||
const rootDir = 'packages/lucide-react-native'; // It runs from the root
|
const outputDir = 'dist';
|
||||||
const outputDir = `${rootDir}/dist`;
|
const inputs = ['src/lucide-react-native.js'];
|
||||||
const inputs = [`${rootDir}/src/lucide-react-native.js`];
|
|
||||||
const bundles = [
|
const bundles = [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
@@ -43,6 +42,7 @@ const configs = bundles
|
|||||||
...(preserveModules
|
...(preserveModules
|
||||||
? {
|
? {
|
||||||
dir: `${outputDir}/${format}`,
|
dir: `${outputDir}/${format}`,
|
||||||
|
exports: 'auto',
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import {
|
|||||||
resetFile,
|
resetFile,
|
||||||
toPascalCase,
|
toPascalCase,
|
||||||
writeFile,
|
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
|
// Declare type definitions
|
||||||
const typeDefinitions = `\
|
const typeDefinitions = `\
|
||||||
@@ -28,7 +30,7 @@ export type Icon = React.FC<LucideProps>;
|
|||||||
// Generated icons
|
// Generated icons
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
|
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||||
const TYPES_FILE = 'lucide-react-native.d.ts';
|
const TYPES_FILE = 'lucide-react-native.d.ts';
|
||||||
|
|
||||||
resetFile(TYPES_FILE, srcDirectory);
|
resetFile(TYPES_FILE, srcDirectory);
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
stats
|
|
||||||
node_modules
|
|
||||||
tests
|
|
||||||
scripts
|
|
||||||
build
|
|
||||||
src
|
|
||||||
babel.config.js
|
|
||||||
jest.config.js
|
|
||||||
rollup.config.js
|
|
||||||
@@ -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.
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "lucide-react",
|
"name": "lucide-react",
|
||||||
"description": "A Lucide icon library package for React applications",
|
"description": "A Lucide icon library package for React applications",
|
||||||
"version": "0.83.0",
|
"version": "0.84.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"homepage": "https://lucide.dev",
|
"homepage": "https://lucide.dev",
|
||||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||||
@@ -18,13 +18,15 @@
|
|||||||
"unpkg": "dist/umd/lucide-react.min.js",
|
"unpkg": "dist/umd/lucide-react.min.js",
|
||||||
"typings": "dist/lucide-react.d.ts",
|
"typings": "dist/lucide-react.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"files": ["dist"],
|
||||||
"scripts": {
|
"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",
|
"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:es": "babel src -d dist/esm",
|
||||||
"build:types": "yarn --cwd ../../ babel-node packages/lucide-react/scripts/buildTypes.js",
|
"build:types": "node ./scripts/buildTypes.mjs",
|
||||||
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-react/rollup.config.js",
|
"build:bundles": "rollup -c ./rollup.config.js",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,8 +34,8 @@
|
|||||||
"babel-preset-react-app": "^10.0.0",
|
"babel-preset-react-app": "^10.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react": "^16.5.1",
|
"react": "17.0.2",
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "17.0.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import pkg from './package.json';
|
|||||||
|
|
||||||
const packageName = 'LucideReact';
|
const packageName = 'LucideReact';
|
||||||
const outputFileName = 'lucide-react';
|
const outputFileName = 'lucide-react';
|
||||||
const rootDir = 'packages/lucide-react'; // It runs from the root
|
const outputDir = `dist`;
|
||||||
const outputDir = `${rootDir}/dist`;
|
const inputs = [`src/lucide-react.js`];
|
||||||
const inputs = [`${rootDir}/src/lucide-react.js`];
|
|
||||||
const bundles = [
|
const bundles = [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import {
|
|||||||
resetFile,
|
resetFile,
|
||||||
toPascalCase,
|
toPascalCase,
|
||||||
writeFile,
|
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
|
// Declare type definitions
|
||||||
const typeDefinitions = `\
|
const typeDefinitions = `\
|
||||||
@@ -28,7 +30,7 @@ export type Icon = React.FC<LucideProps>;
|
|||||||
// Generated icons
|
// Generated icons
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
|
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||||
const TYPES_FILE = 'lucide-react.d.ts';
|
const TYPES_FILE = 'lucide-react.d.ts';
|
||||||
|
|
||||||
resetFile(TYPES_FILE, srcDirectory);
|
resetFile(TYPES_FILE, srcDirectory);
|
||||||
@@ -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.
|
|
||||||
@@ -11,10 +11,11 @@
|
|||||||
},
|
},
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"move:icons": "cp -r ../../icons icons",
|
"copy:icons": "cp -r ../../icons icons",
|
||||||
"move:tags": "cp ../../tags.json tags.json",
|
"copy:tags": "cp ../../tags.json tags.json",
|
||||||
"build": "yarn clean && yarn move:icons && yarn move:tags && yarn build:lib",
|
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||||
"build:lib": "yarn --cwd ../../ babel-node packages/lucide-static/scripts/buildLib.js",
|
"build": "pnpm clean && pnpm copy:license && pnpm copy:icons && pnpm copy:tags && pnpm build:lib",
|
||||||
|
"build:lib": "node ./scripts/buildLib.mjs",
|
||||||
"clean": "rm -rf lib && rm -rf build && rm -rf icons && rm -f sprite.svg && rm -f tags.json"
|
"clean": "rm -rf lib && rm -rf build && rm -rf icons && rm -f sprite.svg && rm -f tags.json"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ import path from 'path';
|
|||||||
import getArgumentOptions from 'minimist';
|
import getArgumentOptions from 'minimist';
|
||||||
import { parseSync } from 'svgson';
|
import { parseSync } from 'svgson';
|
||||||
|
|
||||||
// import renderIconsObject from '../../../scripts/render/renderIconsObject';
|
import { appendFile, readSvgDirectory, toCamelCase, getCurrentDirPath } from '../../../scripts/helpers.mjs';
|
||||||
import { appendFile, readSvgDirectory, toCamelCase } from '../../../scripts/helpers';
|
import readSvgs from './readSvgs.mjs';
|
||||||
import readSvgs from './readSvgs';
|
import generateSprite from './generateSprite.mjs';
|
||||||
import generateSprite from './generateSprite';
|
import generateIconNodes from './generateIconNodes.mjs';
|
||||||
import generateIconNodes from './generateIconNodes';
|
|
||||||
|
|
||||||
const cliArguments = getArgumentOptions(process.argv.slice(2));
|
const cliArguments = getArgumentOptions(process.argv.slice(2));
|
||||||
const createDirectory = dir => {
|
const createDirectory = dir => {
|
||||||
@@ -17,7 +16,9 @@ const createDirectory = dir => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const PACKAGE_DIR = path.resolve(__dirname, '../');
|
const currentDir = getCurrentDirPath(import.meta.url)
|
||||||
|
|
||||||
|
const PACKAGE_DIR = path.resolve(currentDir, '../');
|
||||||
const ICONS_DIR = path.join(PACKAGE_DIR, 'icons');
|
const ICONS_DIR = path.join(PACKAGE_DIR, 'icons');
|
||||||
const LIB_DIR = path.join(PACKAGE_DIR, cliArguments.output || 'lib');
|
const LIB_DIR = path.join(PACKAGE_DIR, cliArguments.output || 'lib');
|
||||||
const ICON_MODULE_DIR = path.join(LIB_DIR, 'icons');
|
const ICON_MODULE_DIR = path.join(LIB_DIR, 'icons');
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { writeFile } from '../../../scripts/helpers';
|
import { writeFile } from '../../../scripts/helpers.mjs';
|
||||||
|
|
||||||
export default function generateIconNodes(parsedSvgs, packageDir) {
|
export default function generateIconNodes(parsedSvgs, packageDir) {
|
||||||
const iconNodes = parsedSvgs.reduce((acc, { name, parsedSvg }) => {
|
const iconNodes = parsedSvgs.reduce((acc, { name, parsedSvg }) => {
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import { stringify } from 'svgson';
|
import { stringify } from 'svgson';
|
||||||
import { format } from 'prettier';
|
import { format } from 'prettier';
|
||||||
import { appendFile } from '../../../scripts/helpers';
|
import { appendFile } from '../../../scripts/helpers.mjs';
|
||||||
|
|
||||||
export default function generateSprite(svgs, packageDir) {
|
export default function generateSprite(svgs, packageDir) {
|
||||||
const symbols = svgs.map(({ name, parsedSvg }) => ({
|
const symbols = svgs.map(({ name, parsedSvg }) => ({
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import { basename } from 'path';
|
import { basename } from 'path';
|
||||||
import { readSvg } from '../../../scripts/helpers';
|
import { readSvg } from '../../../scripts/helpers.mjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build an object in the format: `{ <name>: <contents> }`.
|
* Build an object in the format: `{ <name>: <contents> }`.
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
stats
|
|
||||||
node_modules
|
|
||||||
tests
|
|
||||||
scripts
|
|
||||||
build
|
|
||||||
src
|
|
||||||
babel.config.js
|
|
||||||
jest.config.js
|
|
||||||
rollup.config.js
|
|
||||||
@@ -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.
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "lucide-svelte",
|
"name": "lucide-svelte",
|
||||||
"description": "A Lucide icon library package for Svelte applications",
|
"description": "A Lucide icon library package for Svelte applications",
|
||||||
"version": "0.83.0",
|
"version": "0.84.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"homepage": "https://lucide.dev",
|
"homepage": "https://lucide.dev",
|
||||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||||
@@ -19,22 +19,24 @@
|
|||||||
"unpkg": "dist/umd/lucide-svelte.min.js",
|
"unpkg": "dist/umd/lucide-svelte.min.js",
|
||||||
"typings": "dist/lucide-svelte.d.ts",
|
"typings": "dist/lucide-svelte.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"files": ["dist"],
|
||||||
"scripts": {
|
"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:bundles && pnpm build:types",
|
||||||
|
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.svelte && rm -f index.js",
|
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.svelte && rm -f index.js",
|
||||||
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-svelte/src --templateSrc=../packages/lucide-svelte/scripts/exportTemplate --exportFileName=index.js --iconFileExtention=.svelte --pretty=false",
|
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --exportFileName=index.js --iconFileExtention=.svelte --pretty=false",
|
||||||
"build:es": "babel src -d dist/esm --copy-files",
|
"build:es": "babel src -d dist/esm --copy-files",
|
||||||
"build:types": "yarn --cwd ../../ babel-node packages/lucide-svelte/scripts/buildTypes.js",
|
"build:types": "node ./scripts/buildTypes.mjs",
|
||||||
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-svelte/rollup.config.js",
|
"build:bundles": "rollup -c ./rollup.config.js",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "npm run test -- --watch"
|
"test:watch": "jest --watch"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/jest-dom": "^5.16.2",
|
"@testing-library/jest-dom": "^5.16.2",
|
||||||
"@testing-library/preact": "^2.0.1",
|
"@testing-library/preact": "^2.0.1",
|
||||||
"@testing-library/svelte": "^3.0.3",
|
"@testing-library/svelte": "^3.0.3",
|
||||||
"babel-preset-preact": "^2.0.0",
|
"babel-preset-preact": "^2.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^28.1.3",
|
||||||
"rollup-plugin-svelte": "^7.1.0",
|
"rollup-plugin-svelte": "^7.1.0",
|
||||||
"svelte": "^3.49.0",
|
"svelte": "^3.49.0",
|
||||||
"svelte-jester": "^2.3.1",
|
"svelte-jester": "^2.3.1",
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ import pkg from './package.json';
|
|||||||
|
|
||||||
const packageName = 'LucideSvelte';
|
const packageName = 'LucideSvelte';
|
||||||
const outputFileName = 'lucide-svelte';
|
const outputFileName = 'lucide-svelte';
|
||||||
const rootDir = 'packages/lucide-svelte'; // It runs from the root
|
const outputDir = 'dist';
|
||||||
const outputDir = `${rootDir}/dist`;
|
const inputs = ['./src/lucide-svelte.js'];
|
||||||
const inputs = [`${rootDir}/src/lucide-svelte.js`];
|
|
||||||
const bundles = [
|
const bundles = [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
@@ -51,7 +50,6 @@ const configs = bundles
|
|||||||
commonJS({
|
commonJS({
|
||||||
include: 'node_modules/**',
|
include: 'node_modules/**',
|
||||||
}),
|
}),
|
||||||
// The two minifiers together seem to procude a smaller bundle 🤷♂️
|
|
||||||
minify && terser(),
|
minify && terser(),
|
||||||
license({
|
license({
|
||||||
banner: `${pkg.name} v${pkg.version} - ${pkg.license}`,
|
banner: `${pkg.name} v${pkg.version} - ${pkg.license}`,
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import {
|
|||||||
resetFile,
|
resetFile,
|
||||||
toPascalCase,
|
toPascalCase,
|
||||||
appendFile,
|
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
|
// Declare type definitions
|
||||||
const typeDefinitions = `\
|
const typeDefinitions = `\
|
||||||
@@ -31,7 +33,7 @@ export type Icon = SvelteComponentTyped<IconProps, IconEvents, {}>
|
|||||||
// Generated icons
|
// Generated icons
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
|
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||||
const TYPES_FILE = 'lucide-svelte.d.ts';
|
const TYPES_FILE = 'lucide-svelte.d.ts';
|
||||||
|
|
||||||
resetFile(TYPES_FILE, srcDirectory);
|
resetFile(TYPES_FILE, srcDirectory);
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
stats
|
|
||||||
node_modules
|
|
||||||
tests
|
|
||||||
scripts
|
|
||||||
build
|
|
||||||
src
|
|
||||||
babel.config.js
|
|
||||||
jest.config.js
|
|
||||||
rollup.config.js
|
|
||||||
@@ -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.
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lucide-vue-next",
|
"name": "lucide-vue-next",
|
||||||
"version": "0.83.0",
|
"version": "0.84.0",
|
||||||
"author": "Eric Fennis",
|
"author": "Eric Fennis",
|
||||||
"description": "A Lucide icon library package for Vue 3 applications",
|
"description": "A Lucide icon library package for Vue 3 applications",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
@@ -19,19 +19,21 @@
|
|||||||
"unpkg": "dist/umd/lucide-vue-next.min.js",
|
"unpkg": "dist/umd/lucide-vue-next.min.js",
|
||||||
"typings": "dist/lucide-vue-next.d.ts",
|
"typings": "dist/lucide-vue-next.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"files": ["dist", "nuxt.js"],
|
||||||
"scripts": {
|
"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 ./src/icons/*.js",
|
"clean": "rm -rf dist && rm -rf ./src/icons/*.js",
|
||||||
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-vue-next/src --templateSrc=../packages/lucide-vue-next/scripts/exportTemplate --renderUniqueKey",
|
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
|
||||||
"build:es": "babel src -d dist/esm",
|
"build:es": "babel src -d dist/esm",
|
||||||
"build:types": "yarn --cwd ../../ babel-node packages/lucide-vue-next/scripts/buildTypes.js",
|
"build:types": "node ./scripts/buildTypes.mjs",
|
||||||
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-vue-next/rollup.config.js",
|
"build:bundles": "rollup -c ./rollup.config.js",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/vue": "^6.4.2",
|
"@testing-library/vue": "^6.4.2",
|
||||||
"@vue/compiler-sfc": "3.0.1",
|
"@vue/compiler-sfc": "3.0.6",
|
||||||
"@vue/test-utils": "2.0.0-rc.18",
|
"@vue/test-utils": "2.0.0-rc.18",
|
||||||
"jest-serializer-vue": "^2.0.2",
|
"jest-serializer-vue": "^2.0.2",
|
||||||
"vue": "3.0.6",
|
"vue": "3.0.6",
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import pkg from './package.json';
|
|||||||
|
|
||||||
const packageName = 'LucideVueNext';
|
const packageName = 'LucideVueNext';
|
||||||
const outputFileName = 'lucide-vue-next';
|
const outputFileName = 'lucide-vue-next';
|
||||||
const rootDir = 'packages/lucide-vue-next'; // It runs from the root
|
const outputDir = 'dist';
|
||||||
const outputDir = `${rootDir}/dist`;
|
const inputs = ['src/lucide-vue-next.js'];
|
||||||
const inputs = [`${rootDir}/src/lucide-vue-next.js`];
|
|
||||||
const bundles = [
|
const bundles = [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { readSvgDirectory, resetFile, appendFile, toPascalCase } from '../../../scripts/helpers';
|
import {
|
||||||
|
readSvgDirectory,
|
||||||
|
resetFile,
|
||||||
|
appendFile,
|
||||||
|
toPascalCase,
|
||||||
|
getCurrentDirPath
|
||||||
|
} from '../../../scripts/helpers.mjs';
|
||||||
|
|
||||||
const TARGET_DIR = path.join(__dirname, '../dist');
|
const currentDir = getCurrentDirPath(import.meta.url)
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
|
|
||||||
|
const TARGET_DIR = path.join(currentDir, '../dist');
|
||||||
|
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||||
const TYPES_FILE_NAME = 'lucide-vue-next.d.ts';
|
const TYPES_FILE_NAME = 'lucide-vue-next.d.ts';
|
||||||
|
|
||||||
// Generates header of d.ts file include some types and functions
|
// Generates header of d.ts file include some types and functions
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
stats
|
|
||||||
node_modules
|
|
||||||
tests
|
|
||||||
scripts
|
|
||||||
build
|
|
||||||
src
|
|
||||||
babel.config.js
|
|
||||||
jest.config.js
|
|
||||||
rollup.config.js
|
|
||||||
@@ -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.
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lucide-vue",
|
"name": "lucide-vue",
|
||||||
"version": "0.83.0",
|
"version": "0.84.0",
|
||||||
"author": "Eric Fennis",
|
"author": "Eric Fennis",
|
||||||
"description": "A Lucide icon library package for Vue 2 applications",
|
"description": "A Lucide icon library package for Vue 2 applications",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
@@ -18,12 +18,14 @@
|
|||||||
"module": "dist/esm/lucide-vue.js",
|
"module": "dist/esm/lucide-vue.js",
|
||||||
"unpkg": "dist/umd/lucide-vue.min.js",
|
"unpkg": "dist/umd/lucide-vue.min.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"files": ["dist"],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn clean && yarn build:icons && (yarn build:es & yarn build:bundles)",
|
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:es && pnpm build:bundles",
|
||||||
|
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
|
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
|
||||||
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-vue/src --templateSrc=../packages/lucide-vue/scripts/exportTemplate",
|
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs",
|
||||||
"build:es": "babel src -d dist/esm",
|
"build:es": "babel src -d dist/esm",
|
||||||
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-vue/rollup.config.js",
|
"build:bundles": "rollup -c ./rollup.config.js",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import pkg from './package.json';
|
|||||||
|
|
||||||
const packageName = 'LucideVue';
|
const packageName = 'LucideVue';
|
||||||
const outputFileName = 'lucide-vue';
|
const outputFileName = 'lucide-vue';
|
||||||
const rootDir = 'packages/lucide-vue'; // It runs from the root
|
const outputDir = 'dist';
|
||||||
const outputDir = `${rootDir}/dist`;
|
const inputs = ['src/lucide-vue.js'];
|
||||||
const inputs = [`${rootDir}/src/lucide-vue.js`];
|
|
||||||
const bundles = [
|
const bundles = [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
|
|||||||
@@ -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.
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "lucide",
|
"name": "lucide",
|
||||||
"description": "A Lucide icon library package for web and javascript applications.",
|
"description": "A Lucide icon library package for web and javascript applications.",
|
||||||
"version": "0.83.0",
|
"version": "0.84.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"homepage": "https://lucide.dev",
|
"homepage": "https://lucide.dev",
|
||||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||||
@@ -11,20 +11,23 @@
|
|||||||
"directory": "packages/lucide"
|
"directory": "packages/lucide"
|
||||||
},
|
},
|
||||||
"amdName": "lucide",
|
"amdName": "lucide",
|
||||||
"source": "build/lucide.js",
|
"source": "src/lucide.js",
|
||||||
"main": "dist/cjs/lucide.js",
|
"main": "dist/cjs/lucide.js",
|
||||||
"main:umd": "dist/umd/lucide.js",
|
"main:umd": "dist/umd/lucide.js",
|
||||||
"module": "dist/esm/lucide.js",
|
"module": "dist/esm/lucide.js",
|
||||||
"unpkg": "dist/umd/lucide.min.js",
|
"unpkg": "dist/umd/lucide.min.js",
|
||||||
"typings": "dist/lucide.d.ts",
|
"typings": "dist/lucide.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"files": ["dist"],
|
||||||
"scripts": {
|
"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:bundles && pnpm build:types",
|
||||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
|
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||||
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide/src",
|
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.ts",
|
||||||
|
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs",
|
||||||
"build:es": "babel src -d dist/esm",
|
"build:es": "babel src -d dist/esm",
|
||||||
"build:types": "yarn --cwd ../../ babel-node packages/lucide/scripts/buildTypes.js",
|
"build:types": "node ./scripts/buildTypes.mjs",
|
||||||
"build:bundles": "rollup -c rollup.config.js",
|
"build:bundles": "rollup -c rollup.config.js",
|
||||||
"test": "jest"
|
"test": "jest",
|
||||||
|
"version": "pnpm version --git-tag-version=false"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,30 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { readSvgDirectory, resetFile, appendFile, toPascalCase } from '../../../scripts/helpers';
|
import {
|
||||||
import defaultAttributes from '../src/defaultAttributes';
|
readSvgDirectory,
|
||||||
|
resetFile,
|
||||||
|
appendFile,
|
||||||
|
writeFile,
|
||||||
|
toPascalCase,
|
||||||
|
getCurrentDirPath,
|
||||||
|
} from '../../../scripts/helpers.mjs';
|
||||||
|
|
||||||
const TARGET_DIR = path.join(__dirname, '../dist');
|
const currentDir = getCurrentDirPath(import.meta.url)
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
|
|
||||||
|
const defaultAttributes = {
|
||||||
|
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',
|
||||||
|
};
|
||||||
|
|
||||||
|
const TARGET_DIR = path.join(currentDir, '../dist');
|
||||||
|
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||||
const TYPES_FILE_NAME = 'lucide.d.ts';
|
const TYPES_FILE_NAME = 'lucide.d.ts';
|
||||||
|
|
||||||
// Generates header of d.ts file include some types and functions
|
// Generates header of d.ts file include some types and functions
|
||||||
@@ -53,8 +73,7 @@ export declare const icons: Icons;
|
|||||||
// Generated icons
|
// Generated icons
|
||||||
`;
|
`;
|
||||||
|
|
||||||
resetFile(TYPES_FILE_NAME, TARGET_DIR);
|
writeFile(typeDefinitions, TYPES_FILE_NAME, TARGET_DIR);
|
||||||
appendFile(typeDefinitions, TYPES_FILE_NAME, TARGET_DIR);
|
|
||||||
|
|
||||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||||
|
|
||||||
22031
pnpm-lock.yaml
generated
Normal file
3
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
packages:
|
||||||
|
- 'packages/*'
|
||||||
|
- 'site'
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import babel from '@rollup/plugin-babel';
|
import babel from '@rollup/plugin-babel';
|
||||||
import bundleSize from '@atomico/rollup-plugin-sizes';
|
import bundleSize from '@atomico/rollup-plugin-sizes';
|
||||||
import compiler from '@ampproject/rollup-plugin-closure-compiler';
|
|
||||||
import { terser } from 'rollup-plugin-terser';
|
import { terser } from 'rollup-plugin-terser';
|
||||||
import visualizer from 'rollup-plugin-visualizer';
|
import visualizer from 'rollup-plugin-visualizer';
|
||||||
import license from 'rollup-plugin-license';
|
import license from 'rollup-plugin-license';
|
||||||
@@ -23,8 +22,6 @@ const plugins = (pkg, minify) =>
|
|||||||
babel({
|
babel({
|
||||||
babelHelpers: 'bundled',
|
babelHelpers: 'bundled',
|
||||||
}),
|
}),
|
||||||
// The two minifiers together seem to procude a smaller bundle 🤷♂️
|
|
||||||
minify && compiler(),
|
|
||||||
minify && terser(),
|
minify && terser(),
|
||||||
license({
|
license({
|
||||||
banner: `${pkg.name} v${pkg.version} - ${pkg.license}`,
|
banner: `${pkg.name} v${pkg.version} - ${pkg.license}`,
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import tags from '../tags.json';
|
import tags from '../tags.json' assert { type: 'json' };
|
||||||
import { readSvgDirectory, writeFile } from './helpers';
|
import { readSvgDirectory, writeFile, getCurrentDirPath } from './helpers.mjs';
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../icons');
|
const currentDir = getCurrentDirPath(import.meta.url)
|
||||||
|
const ICONS_DIR = path.resolve(currentDir, '../icons');
|
||||||
|
|
||||||
console.log(`Read all tags`);
|
console.log(`Read all tags`);
|
||||||
|
|
||||||
@@ -38,4 +39,4 @@ const newTags = iconTags.reduce((acc, { name, tags }) => {
|
|||||||
|
|
||||||
const tagsContent = JSON.stringify(newTags, null, 2);
|
const tagsContent = JSON.stringify(newTags, null, 2);
|
||||||
|
|
||||||
writeFile(tagsContent, 'tags.json', path.resolve(__dirname, '..'));
|
writeFile(tagsContent, 'tags.json', path.resolve(currentDir, '..'));
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
import fs from 'fs';
|
|
||||||
import path from 'path';
|
|
||||||
import getArgumentOptions from 'minimist'; // eslint-disable-line import/no-extraneous-dependencies
|
|
||||||
|
|
||||||
import renderIconsObject from './render/renderIconsObject';
|
|
||||||
import generateIconFiles from './build/generateIconFiles';
|
|
||||||
import generateExportsFile from './build/generateExportsFile';
|
|
||||||
|
|
||||||
import { readSvgDirectory } from './helpers';
|
|
||||||
|
|
||||||
const cliArguments = getArgumentOptions(process.argv.slice(2));
|
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve(__dirname, '../icons');
|
|
||||||
const OUTPUT_DIR = path.resolve(__dirname, cliArguments.output || '../build');
|
|
||||||
|
|
||||||
if (!fs.existsSync(OUTPUT_DIR)) {
|
|
||||||
fs.mkdirSync(OUTPUT_DIR);
|
|
||||||
}
|
|
||||||
|
|
||||||
const {
|
|
||||||
renderUniqueKey = false,
|
|
||||||
templateSrc = './templates/defaultIconFileTemplate',
|
|
||||||
silent = false,
|
|
||||||
iconFileExtention = '.js',
|
|
||||||
exportFileName = 'index.js',
|
|
||||||
pretty = true,
|
|
||||||
} = cliArguments;
|
|
||||||
|
|
||||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
|
||||||
|
|
||||||
const icons = renderIconsObject(svgFiles, ICONS_DIR, renderUniqueKey);
|
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-dynamic-require
|
|
||||||
const iconFileTemplate = require(templateSrc).default;
|
|
||||||
|
|
||||||
// Generates iconsNodes files for each icon
|
|
||||||
generateIconFiles({
|
|
||||||
iconNodes: icons,
|
|
||||||
outputDirectory: OUTPUT_DIR,
|
|
||||||
template: iconFileTemplate,
|
|
||||||
showLog: !silent,
|
|
||||||
iconFileExtention,
|
|
||||||
pretty: JSON.parse(pretty),
|
|
||||||
});
|
|
||||||
|
|
||||||
// Generates entry files for the compiler filled with icons exports
|
|
||||||
generateExportsFile(
|
|
||||||
path.join(OUTPUT_DIR, 'icons', exportFileName),
|
|
||||||
path.join(OUTPUT_DIR, 'icons'),
|
|
||||||
icons,
|
|
||||||
iconFileExtention,
|
|
||||||
);
|
|
||||||
67
scripts/buildIcons.mjs
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
import getArgumentOptions from 'minimist'; // eslint-disable-line import/no-extraneous-dependencies
|
||||||
|
|
||||||
|
import renderIconsObject from './render/renderIconsObject.mjs';
|
||||||
|
import generateIconFiles from './building/generateIconFiles.mjs';
|
||||||
|
import generateExportsFile from './building/generateExportsFile.mjs';
|
||||||
|
|
||||||
|
import { readSvgDirectory, getCurrentDirPath } from './helpers.mjs';
|
||||||
|
|
||||||
|
const cliArguments = getArgumentOptions(process.argv.slice(2));
|
||||||
|
|
||||||
|
const currentDir = getCurrentDirPath(import.meta.url)
|
||||||
|
|
||||||
|
const ICONS_DIR = path.resolve(currentDir, '../icons');
|
||||||
|
const OUTPUT_DIR = path.resolve(process.cwd(), cliArguments.output || '../build');
|
||||||
|
|
||||||
|
if (!fs.existsSync(OUTPUT_DIR)) {
|
||||||
|
fs.mkdirSync(OUTPUT_DIR);
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
renderUniqueKey = false,
|
||||||
|
templateSrc,
|
||||||
|
silent = false,
|
||||||
|
iconFileExtention = '.js',
|
||||||
|
exportFileName = 'index.js',
|
||||||
|
pretty = true,
|
||||||
|
} = cliArguments;
|
||||||
|
|
||||||
|
async function buildIcons() {
|
||||||
|
|
||||||
|
if (templateSrc == null) {
|
||||||
|
throw new Error('No `templateSrc` argument given.')
|
||||||
|
}
|
||||||
|
|
||||||
|
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||||
|
|
||||||
|
const icons = renderIconsObject(svgFiles, ICONS_DIR, renderUniqueKey);
|
||||||
|
|
||||||
|
|
||||||
|
const {default: iconFileTemplate} = await import(path.resolve(process.cwd(), templateSrc));
|
||||||
|
|
||||||
|
// Generates iconsNodes files for each icon
|
||||||
|
generateIconFiles({
|
||||||
|
iconNodes: icons,
|
||||||
|
outputDirectory: OUTPUT_DIR,
|
||||||
|
template: iconFileTemplate,
|
||||||
|
showLog: !silent,
|
||||||
|
iconFileExtention,
|
||||||
|
pretty: JSON.parse(pretty),
|
||||||
|
});
|
||||||
|
|
||||||
|
// Generates entry files for the compiler filled with icons exports
|
||||||
|
generateExportsFile(
|
||||||
|
path.join(OUTPUT_DIR, 'icons', exportFileName),
|
||||||
|
path.join(OUTPUT_DIR, 'icons'),
|
||||||
|
icons,
|
||||||
|
iconFileExtention,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
buildIcons()
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { toPascalCase, resetFile, appendFile } from '../helpers';
|
import { toPascalCase, resetFile, appendFile } from '../helpers.mjs';
|
||||||
|
|
||||||
export default function(inputEntry, outputDirectory, iconNodes, iconFileExtention = '') {
|
export default function(inputEntry, outputDirectory, iconNodes, iconFileExtention = '') {
|
||||||
const fileName = path.basename(inputEntry);
|
const fileName = path.basename(inputEntry);
|
||||||
@@ -10,7 +10,8 @@ export default function(inputEntry, outputDirectory, iconNodes, iconFileExtentio
|
|||||||
|
|
||||||
const icons = Object.keys(iconNodes);
|
const icons = Object.keys(iconNodes);
|
||||||
|
|
||||||
const fileExtention = iconFileExtention === '.ts' || iconFileExtention === '.js' ? '' : iconFileExtention
|
const fileExtention =
|
||||||
|
iconFileExtention === '.ts' || iconFileExtention === '.js' ? '' : iconFileExtention;
|
||||||
|
|
||||||
// Generate Import for Icon VNodes
|
// Generate Import for Icon VNodes
|
||||||
icons.forEach(iconName => {
|
icons.forEach(iconName => {
|
||||||
@@ -2,10 +2,16 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import prettier from 'prettier';
|
import prettier from 'prettier';
|
||||||
import { promises } from 'stream';
|
import { toPascalCase } from '../helpers.mjs';
|
||||||
import { toPascalCase } from '../helpers';
|
|
||||||
|
|
||||||
export default function({ iconNodes, outputDirectory, template, showLog = true, iconFileExtention = '.js', pretty = true }) {
|
export default function({
|
||||||
|
iconNodes,
|
||||||
|
outputDirectory,
|
||||||
|
template,
|
||||||
|
showLog = true,
|
||||||
|
iconFileExtention = '.js',
|
||||||
|
pretty = true,
|
||||||
|
}) {
|
||||||
const icons = Object.keys(iconNodes);
|
const icons = Object.keys(iconNodes);
|
||||||
const iconsDistDirectory = path.join(outputDirectory, `icons`);
|
const iconsDistDirectory = path.join(outputDirectory, `icons`);
|
||||||
|
|
||||||
@@ -18,28 +24,27 @@ export default function({ iconNodes, outputDirectory, template, showLog = true,
|
|||||||
const componentName = toPascalCase(iconName);
|
const componentName = toPascalCase(iconName);
|
||||||
|
|
||||||
let { children } = iconNodes[iconName];
|
let { children } = iconNodes[iconName];
|
||||||
children = children.map(({name, attributes}) => ([name, attributes]))
|
children = children.map(({ name, attributes }) => [name, attributes]);
|
||||||
|
|
||||||
const elementTemplate = template({ componentName, iconName, children });
|
const elementTemplate = template({ componentName, iconName, children });
|
||||||
const output =
|
const output = pretty
|
||||||
pretty
|
|
||||||
? prettier.format(elementTemplate, {
|
? prettier.format(elementTemplate, {
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
trailingComma: 'all',
|
trailingComma: 'all',
|
||||||
parser: 'babel',
|
parser: 'babel',
|
||||||
})
|
})
|
||||||
: elementTemplate
|
: elementTemplate;
|
||||||
|
|
||||||
await fs.promises.writeFile(location, output, 'utf-8');
|
await fs.promises.writeFile(location, output, 'utf-8');
|
||||||
});
|
});
|
||||||
|
|
||||||
Promise.all(writeIconFiles)
|
Promise.all(writeIconFiles)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if(showLog) {
|
if (showLog) {
|
||||||
console.log('Successfully built', icons.length, 'icons.');
|
console.log('Successfully built', icons.length, 'icons.');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch(error => {
|
||||||
throw new Error(`Something went wrong generating icon files,\n ${error}`)
|
throw new Error(`Something went wrong generating icon files,\n ${error}`);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import getArgumentOptions from 'minimist'; // eslint-disable-line import/no-extraneous-dependencies
|
import getArgumentOptions from 'minimist'; // eslint-disable-line import/no-extraneous-dependencies
|
||||||
import githubApi from './githubApi';
|
import githubApi from './githubApi.mjs';
|
||||||
|
|
||||||
const fetchCompareTags = oldTag =>
|
const fetchCompareTags = oldTag =>
|
||||||
githubApi(`https://api.github.com/repos/lucide-icons/lucide/compare/${oldTag}...main`);
|
githubApi(`https://api.github.com/repos/lucide-icons/lucide/compare/${oldTag}...main`);
|
||||||
@@ -41,6 +41,11 @@ const cliArguments = getArgumentOptions(process.argv.slice(2));
|
|||||||
(async function() {
|
(async function() {
|
||||||
try {
|
try {
|
||||||
const output = await fetchCompareTags(cliArguments['old-tag']);
|
const output = await fetchCompareTags(cliArguments['old-tag']);
|
||||||
|
|
||||||
|
if (output?.files == null) {
|
||||||
|
throw new Error('Tag not found!')
|
||||||
|
}
|
||||||
|
|
||||||
const changedFiles = output.files.filter(
|
const changedFiles = output.files.filter(
|
||||||
({ filename }) => !filename.match(/site\/(.*)|(.*)package\.json|tags.json/g),
|
({ filename }) => !filename.match(/site\/(.*)|(.*)package\.json|tags.json/g),
|
||||||
);
|
);
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { stringify, parseSync } from 'svgson';
|
import { stringify, parseSync } from 'svgson';
|
||||||
import { format } from 'prettier';
|
import prettier from 'prettier';
|
||||||
import { appendFile, readSvgDirectory } from './helpers';
|
import { appendFile, readSvgDirectory, getCurrentDirPath } from './helpers.mjs';
|
||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
|
|
||||||
import readSvgs from '../packages/lucide-static/scripts/readSvgs';
|
import readSvgs from '../packages/lucide-static/scripts/readSvgs.mjs';
|
||||||
|
|
||||||
|
const currentDir = getCurrentDirPath(import.meta.url)
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve('icons');
|
const ICONS_DIR = path.resolve('icons');
|
||||||
const PACKAGE_DIR = path.resolve(__dirname);
|
const PACKAGE_DIR = path.resolve(currentDir);
|
||||||
|
|
||||||
export default function generateSprite(svgs, packageDir) {
|
export default function generateSprite(svgs, packageDir) {
|
||||||
const symbols = svgs.map(({ name, parsedSvg }, index) => {
|
const symbols = svgs.map(({ name, parsedSvg }, index) => {
|
||||||
@@ -37,7 +39,7 @@ export default function generateSprite(svgs, packageDir) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const spriteSvg = stringify(spriteSvgObject);
|
const spriteSvg = stringify(spriteSvgObject);
|
||||||
const prettifiedSprite = format(spriteSvg, { parser: 'babel' }).replace(/;/g, '');
|
const prettifiedSprite = prettier.format(spriteSvg, { parser: 'babel' }).replace(/;/g, '');
|
||||||
|
|
||||||
const xmlMeta = `<?xml version="1.0" encoding="utf-8"?>\n`;
|
const xmlMeta = `<?xml version="1.0" encoding="utf-8"?>\n`;
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts string to CamelCase
|
* Converts string to CamelCase
|
||||||
@@ -139,3 +140,5 @@ export const hasDuplicatedChildren = children => {
|
|||||||
(key, index) => index === hashedKeys.findIndex(childKey => childKey === key),
|
(key, index) => index === hashedKeys.findIndex(childKey => childKey === key),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getCurrentDirPath = currentPath => path.dirname(fileURLToPath(currentPath));
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import processSvg from './render/processSvg';
|
import processSvg from './render/processSvg.mjs';
|
||||||
|
|
||||||
const svgFiles = process.argv.slice(4);
|
const svgFiles = process.argv.slice(4);
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import processSvg from './render/processSvg';
|
import processSvg from './render/processSvg.mjs';
|
||||||
import { readSvgDirectory, writeSvgFile } from './helpers';
|
import { readSvgDirectory, writeSvgFile } from './helpers.mjs';
|
||||||
|
|
||||||
const ICONS_DIR = path.resolve(process.cwd(), 'icons');
|
const ICONS_DIR = path.resolve(process.cwd(), 'icons');
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import { optimize } from 'svgo';
|
import { optimize } from 'svgo';
|
||||||
import { format } from 'prettier';
|
import prettier from 'prettier';
|
||||||
import { parseSync, stringify } from 'svgson';
|
import { parseSync, stringify } from 'svgson';
|
||||||
import DEFAULT_ATTRS from './default-attrs.json';
|
import DEFAULT_ATTRS from './default-attrs.json' assert { type: 'json' };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimize SVG with `svgo`.
|
* Optimize SVG with `svgo`.
|
||||||
@@ -52,7 +52,7 @@ function processSvg(svg) {
|
|||||||
return (
|
return (
|
||||||
optimizeSvg(svg)
|
optimizeSvg(svg)
|
||||||
.then(setAttrs)
|
.then(setAttrs)
|
||||||
.then(optimizedSvg => format(optimizedSvg, { parser: 'babel' }))
|
.then(optimizedSvg => prettier.format(optimizedSvg, { parser: 'babel' }))
|
||||||
// remove semicolon inserted by prettier
|
// remove semicolon inserted by prettier
|
||||||
// because prettier thinks it's formatting JSX not HTML
|
// because prettier thinks it's formatting JSX not HTML
|
||||||
.then(svg => svg.replace(/;/g, ''))
|
.then(svg => svg.replace(/;/g, ''))
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import { basename } from 'path';
|
import { basename } from 'path';
|
||||||
import { parseSync } from 'svgson';
|
import { parseSync } from 'svgson';
|
||||||
import { generateHashedKey, readSvg, hasDuplicatedChildren } from '../helpers';
|
import { generateHashedKey, readSvg, hasDuplicatedChildren } from '../helpers.mjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build an object in the format: `{ <name>: <contents> }`.
|
* Build an object in the format: `{ <name>: <contents> }`.
|
||||||