Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e450afe408 | ||
|
|
6fcfc820ca | ||
|
|
55f264bea6 | ||
|
|
675158df16 | ||
|
|
042393a931 |
11
.eslintrc.js
@@ -7,20 +7,12 @@ module.exports = {
|
||||
node: true,
|
||||
},
|
||||
extends: ['airbnb-base', 'prettier'],
|
||||
plugins: ['import', 'prettier', '@html-eslint'],
|
||||
plugins: ['import', '@html-eslint'],
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'no-param-reassign': 'off',
|
||||
'no-shadow': 'off',
|
||||
'no-use-before-define': 'off',
|
||||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
printWidth: 100
|
||||
},
|
||||
],
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{ devDependencies: ['**/*.test.js', '**/*.spec.js', './scripts/**'] },
|
||||
@@ -46,7 +38,6 @@ module.exports = {
|
||||
files: ['./icons/*.svg'],
|
||||
parser: '@html-eslint/parser',
|
||||
rules: {
|
||||
'prettier/prettier': 'off',
|
||||
'@html-eslint/require-doctype': 'off',
|
||||
'@html-eslint/no-duplicate-attrs': 'error',
|
||||
'@html-eslint/no-inline-styles': 'error',
|
||||
|
||||
2
.github/actions/build-and-test.yml
vendored
@@ -18,7 +18,7 @@ runs:
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
|
||||
2
.github/actions/check-icons.yml
vendored
@@ -18,7 +18,7 @@ runs:
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
|
||||
16
.prettierignore
Normal file
@@ -0,0 +1,16 @@
|
||||
pnpm-lock.yaml
|
||||
|
||||
# lucide-angular
|
||||
packages/lucide-angular/.angular/cache
|
||||
|
||||
# lucide-static
|
||||
packages/lucide-static/icons
|
||||
packages/lucide-static/lib
|
||||
packages/lucide-static/sprite.svg
|
||||
packages/lucide-static/tags.json
|
||||
packages/lucide-static/icon-nodes.json
|
||||
packages/lucide-static/font
|
||||
|
||||
# lucide-svelte
|
||||
packages/lucide-svelte/src/icons/*.svelte
|
||||
packages/lucide-svelte/.svelte-kit
|
||||
@@ -11,6 +11,6 @@
|
||||
.app {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr 1fr
|
||||
grid-template-rows: 1fr 1fr 1fr;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
.app {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr 1fr
|
||||
grid-template-rows: 1fr 1fr 1fr;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ The example below imports all ES Modules, so exercise caution when using it. Imp
|
||||
### Icon Component Example
|
||||
|
||||
```jsx
|
||||
import { icons } from 'lucide-react';
|
||||
import { icons } from 'lucide-react-native';
|
||||
|
||||
const Icon = ({ name, color, size }) => {
|
||||
const LucideIcon = icons[name];
|
||||
|
||||
20
icons/text-search.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"tags": [
|
||||
"find",
|
||||
"data",
|
||||
"copy",
|
||||
"txt",
|
||||
"pdf",
|
||||
"document",
|
||||
"scan",
|
||||
"magnifier",
|
||||
"magnifying glass"
|
||||
],
|
||||
"categories": [
|
||||
"text"
|
||||
]
|
||||
}
|
||||
17
icons/text-search.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"
|
||||
>
|
||||
<path d="M21 6H3" />
|
||||
<path d="M10 12H3" />
|
||||
<path d="M10 18H3" />
|
||||
<circle cx="17" cy="15" r="3" />
|
||||
<path d="m21 19-1.9-1.9" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 344 B |
27
icons/ticket-check.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"tags": [
|
||||
"entry",
|
||||
"pass",
|
||||
"voucher",
|
||||
"event",
|
||||
"concert",
|
||||
"show",
|
||||
"booked",
|
||||
"purchased",
|
||||
"receipt",
|
||||
"redeemed",
|
||||
"validated",
|
||||
"verified",
|
||||
"certified",
|
||||
"checked",
|
||||
"used"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"transportation"
|
||||
]
|
||||
}
|
||||
14
icons/ticket-check.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="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" />
|
||||
<path d="m9 12 2 2 4-4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 354 B |
24
icons/ticket-minus.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"tags": [
|
||||
"entry",
|
||||
"pass",
|
||||
"voucher",
|
||||
"event",
|
||||
"concert",
|
||||
"show",
|
||||
"remove",
|
||||
"cancel",
|
||||
"unbook",
|
||||
"subtract",
|
||||
"decrease",
|
||||
"-"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"transportation"
|
||||
]
|
||||
}
|
||||
14
icons/ticket-minus.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="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" />
|
||||
<path d="M9 12h6" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 348 B |
25
icons/ticket-percent.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"tags": [
|
||||
"discount",
|
||||
"reduced",
|
||||
"offer",
|
||||
"voucher",
|
||||
"entry",
|
||||
"pass",
|
||||
"event",
|
||||
"concert",
|
||||
"show",
|
||||
"book",
|
||||
"purchase",
|
||||
"%"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"transportation",
|
||||
"shopping"
|
||||
]
|
||||
}
|
||||
16
icons/ticket-percent.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 9a3 3 0 1 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 1 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" />
|
||||
<path d="M9 9h.01" />
|
||||
<path d="m15 9-6 6" />
|
||||
<path d="M15 15h.01" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 400 B |
22
icons/ticket-plus.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"tags": [
|
||||
"entry",
|
||||
"pass",
|
||||
"voucher",
|
||||
"event",
|
||||
"concert",
|
||||
"show",
|
||||
"book",
|
||||
"purchase",
|
||||
"add",
|
||||
"+"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"transportation"
|
||||
]
|
||||
}
|
||||
15
icons/ticket-plus.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="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" />
|
||||
<path d="M9 12h6" />
|
||||
<path d="M12 9v6" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 371 B |
39
icons/ticket-slash.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"tags": [
|
||||
"entry",
|
||||
"pass",
|
||||
"voucher",
|
||||
"event",
|
||||
"concert",
|
||||
"show",
|
||||
"redeemed",
|
||||
"used",
|
||||
"marked",
|
||||
"checked",
|
||||
"verified",
|
||||
"spoiled",
|
||||
"invalidated",
|
||||
"void",
|
||||
"denied",
|
||||
"refused",
|
||||
"banned",
|
||||
"barred",
|
||||
"forbidden",
|
||||
"prohibited",
|
||||
"cancelled",
|
||||
"cancellation",
|
||||
"refunded",
|
||||
"delete",
|
||||
"remove",
|
||||
"clear",
|
||||
"error"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"transportation"
|
||||
]
|
||||
}
|
||||
14
icons/ticket-slash.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="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" />
|
||||
<path d="m9.5 14.5 5-5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 354 B |
36
icons/ticket-x.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"tags": [
|
||||
"entry",
|
||||
"pass",
|
||||
"voucher",
|
||||
"event",
|
||||
"concert",
|
||||
"show",
|
||||
"cancelled",
|
||||
"cancellation",
|
||||
"refunded",
|
||||
"used",
|
||||
"void",
|
||||
"invalidated",
|
||||
"spoiled",
|
||||
"denied",
|
||||
"refused",
|
||||
"banned",
|
||||
"barred",
|
||||
"forbidden",
|
||||
"prohibited",
|
||||
"delete",
|
||||
"remove",
|
||||
"clear",
|
||||
"error",
|
||||
"x"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"transportation"
|
||||
]
|
||||
}
|
||||
15
icons/ticket-x.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="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" />
|
||||
<path d="m9.5 14.5 5-5" />
|
||||
<path d="m9.5 9.5 5 5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 382 B |
@@ -9,6 +9,9 @@
|
||||
"entry",
|
||||
"pass",
|
||||
"voucher",
|
||||
"event",
|
||||
"concert",
|
||||
"show",
|
||||
"perforated",
|
||||
"dashed"
|
||||
],
|
||||
|
||||
23
lint-staged.config.mjs
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @param {string[]} filenames
|
||||
* @returns {string}
|
||||
*/
|
||||
const filenamesToAjvOption = (filenames) => filenames.map((filename) => `-d ${filename}`).join(' ');
|
||||
|
||||
/** @satisfies {import('lint-staged').Config} */
|
||||
const config = {
|
||||
'icons/*.svg': [
|
||||
'node ./scripts/optimizeStagedSvgs.mjs',
|
||||
'node ./scripts/generateNextJSAliases.mjs',
|
||||
],
|
||||
'icons/*.json': (filenames) => [
|
||||
`ajv --spec=draft2020 -s icon.schema.json ${filenamesToAjvOption(filenames)}`,
|
||||
`prettier --write ${filenames.join(' ')}`,
|
||||
],
|
||||
'categories/*.json': (filenames) => [
|
||||
`ajv --spec=draft2020 -s category.schema.json ${filenamesToAjvOption(filenames)}`,
|
||||
`prettier --write ${filenames.join(' ')}`,
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
28
package.json
@@ -30,10 +30,11 @@
|
||||
"generate:nextJSAliases": "node ./scripts/generateNextJSAliases.mjs",
|
||||
"postinstall": "husky install",
|
||||
"lint:es": "eslint .",
|
||||
"lint:format": "prettier \"**/*.{js,mjs,ts,jsx,tsx,html,css,scss,json,yml,yaml}\" --write",
|
||||
"lint:json:icons": "ajv --spec=draft2020 -s icon.schema.json -d 'icons/*.json' > /dev/null",
|
||||
"lint:json:categories": "ajv --spec=draft2020 -s category.schema.json -d 'categories/*.json' > /dev/null",
|
||||
"lint:json": "pnpm run lint:json:icons && pnpm run lint:json:categories",
|
||||
"lint": "pnpm lint:es && pnpm lint:json",
|
||||
"lint": "pnpm lint:es && pnpm lint:format && pnpm lint:json",
|
||||
"prepare": "husky install",
|
||||
"gi": "node ./scripts/generate/generateIcons.mjs"
|
||||
},
|
||||
@@ -52,40 +53,19 @@
|
||||
"eslint-import-resolver-custom-alias": "^1.3.2",
|
||||
"eslint-import-resolver-typescript": "^3.6.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^13.3.0",
|
||||
"minimist": "^1.2.8",
|
||||
"node-fetch": "^3.3.2",
|
||||
"p-memoize": "^7.1.1",
|
||||
"prettier": "2.7.1",
|
||||
"prettier": "3.1.1",
|
||||
"semver": "^7.5.4",
|
||||
"simple-git": "^3.21.0",
|
||||
"svgo": "^3.1.0",
|
||||
"svgson": "^5.3.1"
|
||||
},
|
||||
"lint-staged": {
|
||||
"icons/*.svg": [
|
||||
"node ./scripts/optimizeStagedSvgs.mjs",
|
||||
"node ./scripts/generateNextJSAliases.mjs"
|
||||
],
|
||||
"icons/*.json": [
|
||||
"ajv --spec=draft2020 -s icon.schema.json -d",
|
||||
"prettier --write --print-width=0"
|
||||
],
|
||||
"categories/*.json": [
|
||||
"ajv --spec=draft2020 -s category.schema.json -d",
|
||||
"prettier --write --print-width=0"
|
||||
]
|
||||
},
|
||||
"packageManager": "pnpm@8.7.1",
|
||||
"packageManager": "pnpm@8.14.0+sha256.9cebf61abd83f68177b29484da72da9751390eaad46dfc3072d266bfbb1ba7bf",
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
"ignoreMissing": [
|
||||
"@babel/core",
|
||||
"@babel/preset-env"
|
||||
]
|
||||
},
|
||||
"packageExtensions": {
|
||||
"vue-template-compiler": {
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -8,6 +8,7 @@ module.exports = {
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:@angular-eslint/recommended',
|
||||
'plugin:@angular-eslint/template/process-inline-templates',
|
||||
'prettier',
|
||||
],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
"test": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
|
||||
"test:watch": "ng test",
|
||||
"lint": "npx eslint 'src/**/*.{js,jsx,ts,tsx,html,css,scss}' --quiet --fix",
|
||||
"format": "npx prettier 'src/**/*.{js,jsx,ts,tsx,html,css,scss}' --write",
|
||||
"e2e": "ng e2e",
|
||||
"version": "pnpm version --git-tag-version=false"
|
||||
},
|
||||
@@ -59,7 +58,6 @@
|
||||
"@typescript-eslint/parser": "5.48.2",
|
||||
"eslint": "^8.33.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"jasmine-core": "~4.0.0",
|
||||
"jasmine-spec-reporter": "~7.0.0",
|
||||
"karma": "~6.3.0",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"@vitejs/plugin-react": "^1.0.0",
|
||||
"typescript": "^4.3.2",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vite-plugin-singlefile": "^0.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"rollup": "^4.9.2",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vitest": "^1.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"rollup": "^4.9.2",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vitest": "^1.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"rollup": "^4.9.2",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vitest": "^1.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"rollup-preset-solid": "^2.0.1",
|
||||
"solid-js": "^1.8.7",
|
||||
"typescript": "^4.9.4",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vite-plugin-solid": "^2.8.0",
|
||||
"vitest": "0.34.2"
|
||||
},
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"svelte-check": "^3.4.4",
|
||||
"svelte-preprocess": "^5.0.4",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vitest": "^1.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"@vue/test-utils": "2.4.3",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vitest": "^1.1.1",
|
||||
"vue": "^3.0.1"
|
||||
},
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
"@vue/test-utils": "1.3.0",
|
||||
"rollup": "^3.23.0",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vitest": "^0.32.2",
|
||||
"vue": "2.7.14",
|
||||
"vue-template-compiler": "2.7.14"
|
||||
|
||||
@@ -59,7 +59,7 @@ export default (iconName: string, iconNode: IconNode): Component => ({
|
||||
return createElement(
|
||||
'svg',
|
||||
{
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
// prettier-ignore
|
||||
class: [defaultClass, data.class, data.staticClass, data.attrs && data.attrs.class].filter(Boolean),
|
||||
style: [data.style, data.staticStyle, data.attrs && data.attrs.style].filter(Boolean),
|
||||
attrs: {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"rollup": "^4.9.2",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "5.0.10",
|
||||
"vite": "5.0.12",
|
||||
"vitest": "^1.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
989
pnpm-lock.yaml
generated
16
prettier.config.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
/** @satisfies {import('prettier').Config} */
|
||||
const config = {
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
printWidth: 100,
|
||||
overrides: [
|
||||
{
|
||||
files: ['icons/*.json', 'categories/*.json'],
|
||||
options: {
|
||||
printWidth: 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -1,6 +1,6 @@
|
||||
import path from 'path';
|
||||
import { stringify, parseSync } from 'svgson';
|
||||
import prettier from 'prettier';
|
||||
import * as prettier from 'prettier';
|
||||
import { appendFile, readSvgDirectory, getCurrentDirPath } from './helpers.mjs';
|
||||
|
||||
import readSvgs from '../packages/lucide-static/scripts/readSvgs.mjs';
|
||||
@@ -10,7 +10,7 @@ const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const ICONS_DIR = path.resolve('icons');
|
||||
const PACKAGE_DIR = path.resolve(currentDir);
|
||||
|
||||
export default function generateSprite(svgs, packageDir) {
|
||||
async function generateSprite(svgs, packageDir) {
|
||||
const symbols = svgs.map(({ parsedSvg }, index) => {
|
||||
const itemsPerRow = 10;
|
||||
const numInRow = index % itemsPerRow;
|
||||
@@ -37,7 +37,7 @@ export default function generateSprite(svgs, packageDir) {
|
||||
};
|
||||
|
||||
const spriteSvg = stringify(spriteSvgObject);
|
||||
const prettifiedSprite = prettier.format(spriteSvg, { parser: 'babel' }).replace(/;/g, '');
|
||||
const prettifiedSprite = (await prettier.format(spriteSvg, { parser: 'babel' })).replace(/;/g, '');
|
||||
|
||||
const xmlMeta = `<?xml version="1.0" encoding="utf-8"?>\n`;
|
||||
|
||||
@@ -54,4 +54,4 @@ const parsedSvgs = svgs.map(({ name, contents }) => ({
|
||||
parsedSvg: parseSync(contents),
|
||||
}));
|
||||
|
||||
generateSprite(parsedSvgs, PACKAGE_DIR);
|
||||
await generateSprite(parsedSvgs, PACKAGE_DIR);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {optimize} from 'svgo';
|
||||
import prettier from 'prettier';
|
||||
import * as prettier from 'prettier';
|
||||
import {parseSync, stringify} from 'svgson';
|
||||
import DEFAULT_ATTRS from './default-attrs.json' assert { type: 'json' };
|
||||
|
||||
|
||||