From 0a0fd1cf6c0467012f649afc7f4b68ca9c7365e5 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Mon, 16 Oct 2023 22:03:57 +0200 Subject: [PATCH] Adds new font in `lucide-static` and speed up icon outlining (#1599) * Apply new icon font build in release * remove dockerfile --- .github/workflows/release.yml | 9 ++- pnpm-lock.yaml | 110 +++++++++++++++++++++------------ scripts/Dockerfile | 21 ------- tools/outline-svg/package.json | 2 +- 4 files changed, 75 insertions(+), 67 deletions(-) delete mode 100644 scripts/Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46d4de07468..1be94b60f96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,7 +149,6 @@ jobs: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest needs: pre-release - container: ericfennis/lucide-font:latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3.4.1 @@ -182,11 +181,11 @@ jobs: - name: Outline svg Icons run: pnpm build:outline-icons - - name: Create directory - run: mkdir lucide-font + - name: Install dependencies + run: pnpm install --filter build-font - - name: Build font - run: fontcustom compile "./outlined" -h -n "lucide" -o ./lucide-font -F + - name: Create font in ./lucide-font + run: pnpm build:font - name: "Upload to Artifacts" uses: actions/upload-artifact@v1 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe2255cc3ad..8c92956d4c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -686,8 +686,8 @@ importers: specifier: ^1.2.8 version: 1.2.8 oslllo-svg-fixer: - specifier: ^2.2.0 - version: 2.2.0 + specifier: ^3.0.0 + version: 3.0.0 tools/rollup-plugins: dependencies: @@ -863,7 +863,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.1.1 - '@jridgewell/trace-mapping': 0.3.19 + '@jridgewell/trace-mapping': 0.3.18 dev: true /@ampproject/remapping@2.2.1: @@ -871,7 +871,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 + '@jridgewell/trace-mapping': 0.3.18 dev: true /@angular-devkit/architect@0.1303.11: @@ -1254,7 +1254,6 @@ packages: /@assemblyscript/loader@0.10.1: resolution: {integrity: sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg==} - dev: true /@atomico/rollup-plugin-sizes@1.1.4(rollup@3.27.0): resolution: {integrity: sha512-ilxLw9hT+kWXIx8mYoAFLA2eIVfLrsnabPCaGo5Mkrj8qxhEkZvFddcnH2HTp/hDKFEIJRpZVpXecsPp3FOdRw==} @@ -4127,7 +4126,7 @@ packages: resolution: {integrity: sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.9 + regenerator-runtime: 0.13.11 dev: true /@babel/runtime@7.22.15: @@ -4135,7 +4134,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 - dev: false /@babel/runtime@7.22.6: resolution: {integrity: sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==} @@ -5184,11 +5182,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@fastify/busboy@2.0.0: - resolution: {integrity: sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==} - engines: {node: '>=14'} - dev: true - /@figma/plugin-typings@1.72.0: resolution: {integrity: sha512-SRW8qQOLf/QOtgP7OsUfw4oD6Z+tbenLR2PgNXGSh2SJohcnucIEEc7An5Wd5qTl35xfC4TmZE0YpTGMknVpgw==} dev: true @@ -6220,7 +6213,7 @@ packages: '@octokit/request-error': 3.0.3 '@octokit/types': 9.3.2 is-plain-object: 5.0.0 - node-fetch: 2.7.0 + node-fetch: 2.6.12 universal-user-agent: 6.0.0 transitivePeerDependencies: - encoding @@ -7510,7 +7503,7 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 12.20.55 + '@types/node': 20.6.0 dev: true /@types/graceful-fs@4.1.6: @@ -7597,6 +7590,10 @@ packages: resolution: {integrity: sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==} dev: true + /@types/node@20.6.0: + resolution: {integrity: sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==} + dev: true + /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: true @@ -7666,7 +7663,7 @@ packages: /@types/sax@1.2.4: resolution: {integrity: sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 17.0.45 dev: false /@types/scheduler@0.16.3: @@ -8070,7 +8067,7 @@ packages: /@vitest/snapshot@0.32.4: resolution: {integrity: sha512-IRpyqn9t14uqsFlVI2d7DFMImGMs1Q9218of40bdQQgMePwVdmix33yMNnebXcTzDU5eiV3eUsoxxH5v0x/IQA==} dependencies: - magic-string: 0.30.5 + magic-string: 0.30.2 pathe: 1.1.1 pretty-format: 29.6.2 dev: true @@ -8152,7 +8149,7 @@ packages: '@vue/reactivity-transform': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.5 + magic-string: 0.30.3 postcss: 8.4.27 source-map-js: 1.0.2 @@ -9635,6 +9632,13 @@ packages: resolution: {integrity: sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==} dev: true + /busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + dependencies: + streamsearch: 1.1.0 + dev: true + /bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} engines: {node: '>= 0.8'} @@ -10083,7 +10087,6 @@ packages: /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - requiresBuild: true dependencies: color-name: 1.1.3 dev: true @@ -10096,7 +10099,6 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - requiresBuild: true dev: true /color-name@1.1.4: @@ -12118,8 +12120,8 @@ packages: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 - is-core-module: 2.13.0 - resolve: 1.22.4 + is-core-module: 2.12.1 + resolve: 1.22.3 transitivePeerDependencies: - supports-color dev: true @@ -12374,7 +12376,6 @@ packages: /eventemitter-asyncresource@1.0.0: resolution: {integrity: sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ==} - dev: true /eventemitter3@2.0.3: resolution: {integrity: sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==} @@ -13416,11 +13417,9 @@ packages: '@assemblyscript/loader': 0.10.1 base64-js: 1.5.1 pako: 1.0.11 - dev: true /hdr-histogram-percentiles-obj@3.0.0: resolution: {integrity: sha512-7kIufnBqdsBGcSZLPJwqHT3yhk1QTsSlFsVD3kx5ixH/AlgBs9yM1q6DPhXZ8f8gtdqgh7N7/5btRLpQsS2gHw==} - dev: true /he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} @@ -15263,6 +15262,12 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /magic-string@0.30.3: + resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + /magic-string@0.30.5: resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} engines: {node: '>=12'} @@ -16172,7 +16177,6 @@ packages: dependencies: node-addon-api: 3.2.1 node-gyp-build: 4.6.1 - dev: true optional: true /nice-try@1.0.5: @@ -16275,7 +16279,6 @@ packages: /node-addon-api@3.2.1: resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} - dev: true /node-addon-api@7.0.0: resolution: {integrity: sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==} @@ -16336,7 +16339,6 @@ packages: /node-gyp-build@4.6.1: resolution: {integrity: sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==} hasBin: true - dev: true /node-gyp@8.4.1: resolution: {integrity: sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==} @@ -16442,7 +16444,7 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - semver: 7.5.4 + semver: 7.3.5 validate-npm-package-name: 3.0.0 dev: true @@ -16463,7 +16465,7 @@ packages: npm-install-checks: 4.0.0 npm-normalize-package-bin: 1.0.1 npm-package-arg: 8.1.5 - semver: 7.5.4 + semver: 7.3.5 dev: true /npm-registry-fetch@12.0.2: @@ -16791,7 +16793,7 @@ packages: fast-glob: 3.3.1 js-yaml: 4.1.0 supports-color: 9.4.0 - undici: 5.26.3 + undici: 5.24.0 yargs-parser: 21.1.1 dev: true @@ -16833,8 +16835,9 @@ packages: jimp: 0.16.13 dev: false - /oslllo-svg-fixer@2.2.0: - resolution: {integrity: sha512-70jEmHwp/jqq2I2ZVaTOvHykPlEOhIHRto5AHntrjzD8/R6FOk0t8RjlyZNgpPlDjc7T/9a695qKAxF3bFVYKg==} + /oslllo-svg-fixer@3.0.0: + resolution: {integrity: sha512-fk0oWpDfWlcZI42EJfwZV2a7K2hbB63big8KBCDdIU/72QUeUw2z41hTRO/YJeNyFwixb6ecmwOVdJuWQ6SMLg==} + engines: {node: '>=16.0.0'} hasBin: true dependencies: ansi-colors: 4.1.3 @@ -16843,6 +16846,7 @@ packages: oslllo-potrace: 2.0.1 oslllo-svg2: 2.0.2 oslllo-validator: 3.1.0 + piscina: 4.1.0 yargs: 16.2.0 dev: false @@ -16968,7 +16972,7 @@ packages: read-package-json-fast: 2.0.3 rimraf: 3.0.2 ssri: 8.0.1 - tar: 6.2.0 + tar: 6.1.15 transitivePeerDependencies: - bluebird - supports-color @@ -17205,6 +17209,16 @@ packages: nice-napi: 1.0.2 dev: true + /piscina@4.1.0: + resolution: {integrity: sha512-sjbLMi3sokkie+qmtZpkfMCUJTpbxJm/wvaPzU28vmYSsTSW8xk9JcFUsbqGJdtPpIQ9tuj+iDcTtgZjwnOSig==} + dependencies: + eventemitter-asyncresource: 1.0.0 + hdr-histogram-js: 2.0.3 + hdr-histogram-percentiles-obj: 3.0.0 + optionalDependencies: + nice-napi: 1.0.2 + dev: false + /pixelmatch@4.0.2: resolution: {integrity: sha512-J8B6xqiO37sU/gkcMglv6h5Jbd9xNER7aHzpfRdNmV4IbQBzBpe4l9XmbG+xPF/znacgu2jfEw+wHffaq/YkXA==} hasBin: true @@ -18573,12 +18587,11 @@ packages: /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - dev: false /regenerator-transform@0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} dependencies: - '@babel/runtime': 7.16.7 + '@babel/runtime': 7.22.15 dev: true /regex-not@1.0.2: @@ -18720,7 +18733,7 @@ packages: resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} hasBin: true dependencies: - is-core-module: 2.13.0 + is-core-module: 2.12.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -18729,7 +18742,7 @@ packages: resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==} hasBin: true dependencies: - is-core-module: 2.13.0 + is-core-module: 2.12.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -19918,6 +19931,11 @@ packages: - supports-color dev: true + /streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + dev: true + /streamx@2.15.1: resolution: {integrity: sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==} dependencies: @@ -20413,6 +20431,18 @@ packages: streamx: 2.15.1 dev: true + /tar@6.1.15: + resolution: {integrity: sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==} + engines: {node: '>=10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: true + /tar@6.2.0: resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} @@ -20928,11 +20958,11 @@ packages: unplugin: 1.5.0 dev: true - /undici@5.26.3: - resolution: {integrity: sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==} + /undici@5.24.0: + resolution: {integrity: sha512-OKlckxBjFl0oXxcj9FU6oB8fDAaiRUq+D8jrFWGmOfI/gIyjk/IeS75LMzgYKUaeHzLUcYvf9bbJGSrUwTfwwQ==} engines: {node: '>=14.0'} dependencies: - '@fastify/busboy': 2.0.0 + busboy: 1.6.0 dev: true /unenv@1.7.1: diff --git a/scripts/Dockerfile b/scripts/Dockerfile deleted file mode 100644 index c3cea22c806..00000000000 --- a/scripts/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -## This Dockerfile is for building image for github actions -FROM debian:stable-slim - -RUN apt-get update -RUN apt-get install zlib1g-dev fontforge git build-essential ruby-full -y - -# sfnt2woff -RUN git clone https://github.com/bramstein/sfnt2woff-zopfli.git sfnt2woff-zopfli -WORKDIR /sfnt2woff-zopfli -RUN make -RUN cp sfnt2woff-zopfli /usr/local/bin/sfnt2woff - -# WOFF2 -WORKDIR / -RUN git clone --recursive https://github.com/google/woff2.git -WORKDIR /woff2 -RUN make clean all -RUN mv woff2_compress /usr/local/bin/ -RUN mv woff2_decompress /usr/local/bin/ - -RUN gem install fontcustom diff --git a/tools/outline-svg/package.json b/tools/outline-svg/package.json index c23cad08ca1..3d2e93c3362 100644 --- a/tools/outline-svg/package.json +++ b/tools/outline-svg/package.json @@ -12,6 +12,6 @@ "license": "ISC", "dependencies": { "minimist": "^1.2.8", - "oslllo-svg-fixer": "^2.2.0" + "oslllo-svg-fixer": "^3.0.0" } }