Compare commits
13 Commits
remove-umd
...
0.538.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2150ce75ce | ||
|
|
106e37c3ce | ||
|
|
528ffd6fa5 | ||
|
|
3b92fae633 | ||
|
|
fcf42bf754 | ||
|
|
0b6149c02d | ||
|
|
bc9a8de419 | ||
|
|
26ab33a832 | ||
|
|
ac4c3581c4 | ||
|
|
1ddba6da04 | ||
|
|
8754c9b6fd | ||
|
|
e9febe4fab | ||
|
|
570f7d7e76 |
2
.github/ISSUE_TEMPLATE/01_icon_request.yml
vendored
@@ -43,7 +43,7 @@ body:
|
||||
required: true
|
||||
- label: I am not requesting a brand logo and the art is not protected by copyright.
|
||||
required: true
|
||||
- label: I am not requesting an icon that includes religious, political imagery or hate symbols.
|
||||
- label: I am not requesting an icon that includes religious, war/violence related, political imagery or hate symbols.
|
||||
required: true
|
||||
- label: I have provided appropriate use cases for the icon(s) requested.
|
||||
required: true
|
||||
|
||||
2
.github/pull_request_template.md
vendored
@@ -28,7 +28,7 @@ Common scopes: icons, docs, studio, site, dev
|
||||
- [ ] I have provided valid use cases for each icon.
|
||||
- [ ] I have not added any a brand or logo icon.
|
||||
- [ ] I have not used any hate symbols.
|
||||
- [ ] I have not included any religious or political imagery.
|
||||
- [ ] I have not included any religious, war/violence related or political imagery.
|
||||
|
||||
### Author, credits & license<!-- ONLY for new icons. -->
|
||||
<!-- Please choose one of the following, and put an "x" next to it. -->
|
||||
|
||||
@@ -15,8 +15,10 @@ export default eventHandler((event) => {
|
||||
|
||||
const src = Buffer.from(data, 'base64').toString('utf8').replaceAll('\n', '');
|
||||
|
||||
const width = parseInt((src.includes('svg') ? src.match(/width="(\d+)"/)?.[1] : null) ?? '24');
|
||||
const height = parseInt((src.includes('svg') ? src.match(/height="(\d+)"/)?.[1] : null) ?? '24');
|
||||
const width = parseInt((src.includes('<svg ') ? src.match(/width="(\d+)"/)?.[1] : null) ?? '24');
|
||||
const height = parseInt(
|
||||
(src.includes('<svg ') ? src.match(/height="(\d+)"/)?.[1] : null) ?? '24',
|
||||
);
|
||||
|
||||
const children = [];
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@ export default eventHandler((event) => {
|
||||
.replaceAll('\n', '')
|
||||
.replace(/<svg[^>]*>|<\/svg>/g, '');
|
||||
|
||||
const width = parseInt(
|
||||
(newSrc.includes('<svg ') ? newSrc.match(/width="(\d+)"/)?.[1] : null) ?? '24',
|
||||
);
|
||||
const height = parseInt(
|
||||
(newSrc.includes('<svg ') ? newSrc.match(/height="(\d+)"/)?.[1] : null) ?? '24',
|
||||
);
|
||||
|
||||
const children = [];
|
||||
|
||||
const oldSrc = iconNodes[name]
|
||||
@@ -27,7 +34,9 @@ export default eventHandler((event) => {
|
||||
|
||||
const svg = Buffer.from(
|
||||
// We can't use jsx here, is not supported here by nitro.
|
||||
renderToString(createElement(Diff, { oldSrc, newSrc, showGrid: true }, children)),
|
||||
renderToString(
|
||||
createElement(Diff, { oldSrc, newSrc, showGrid: true, height, width }, children),
|
||||
),
|
||||
).toString('utf8');
|
||||
|
||||
defaultContentType(event, 'image/svg+xml');
|
||||
|
||||
@@ -53,8 +53,8 @@ const Backdrop = ({
|
||||
<rect
|
||||
x="0"
|
||||
y="0"
|
||||
width="24"
|
||||
height="24"
|
||||
width="100%"
|
||||
height="100%"
|
||||
fill="#fff"
|
||||
stroke="none"
|
||||
/>
|
||||
@@ -67,8 +67,8 @@ const Backdrop = ({
|
||||
<rect
|
||||
x="0"
|
||||
y="0"
|
||||
width="24"
|
||||
height="24"
|
||||
width="100%"
|
||||
height="100%"
|
||||
opacity={0.5}
|
||||
fill={`url(#pattern-${id})`}
|
||||
stroke="none"
|
||||
|
||||
@@ -7,15 +7,17 @@ const SvgPreview = React.forwardRef<
|
||||
{
|
||||
oldSrc: string;
|
||||
newSrc: string;
|
||||
height: number;
|
||||
width: number;
|
||||
} & React.SVGProps<SVGSVGElement>
|
||||
>(({ oldSrc, newSrc, children, ...props }, ref) => {
|
||||
>(({ oldSrc, newSrc, children, height, width, ...props }, ref) => {
|
||||
return (
|
||||
<svg
|
||||
ref={ref}
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={24}
|
||||
height={24}
|
||||
viewBox="0 0 24 24"
|
||||
width={width}
|
||||
height={height}
|
||||
viewBox={`0 0 ${width} ${height}`}
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth={2}
|
||||
@@ -25,6 +27,8 @@ const SvgPreview = React.forwardRef<
|
||||
>
|
||||
<style>{darkModeCss}</style>
|
||||
<Grid
|
||||
width={width}
|
||||
height={height}
|
||||
strokeWidth={0.1}
|
||||
stroke="#777"
|
||||
strokeOpacity={0.3}
|
||||
@@ -37,8 +41,8 @@ const SvgPreview = React.forwardRef<
|
||||
<rect
|
||||
x="0"
|
||||
y="0"
|
||||
width="24"
|
||||
height="24"
|
||||
width="100%"
|
||||
height="100%"
|
||||
fill="#000"
|
||||
stroke="none"
|
||||
/>
|
||||
|
||||
@@ -178,6 +178,8 @@ const DiamondIcon = createLucideIcon('Diamond', diamond)
|
||||
stroke-width: var(--customize-strokeWidth, 2);
|
||||
width: calc(var(--customize-size, 24) * 1px);
|
||||
height: calc(var(--customize-size, 24) * 1px);
|
||||
max-width: 3rem;
|
||||
max-height: 3rem;
|
||||
}
|
||||
|
||||
html.absolute-stroke-width .lucide-icon.customizable {
|
||||
|
||||
@@ -26,10 +26,9 @@ const iconComponent = computed(() => {
|
||||
<component
|
||||
ref="previewIcon"
|
||||
:is="iconComponent"
|
||||
:width="size"
|
||||
:height="size"
|
||||
:stroke="color"
|
||||
:stroke-width="absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth"
|
||||
:size="size"
|
||||
:color="color"
|
||||
:strokeWidth="absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth"
|
||||
/>
|
||||
<svg class="icon-grid" :viewBox="`0 0 ${size} ${size}`" fill="none" stroke-width="0.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<g :key="`grid-${i}`" v-for="(_, i) in gridLines">
|
||||
|
||||
@@ -110,7 +110,7 @@ const customizingActive = computed(() => {
|
||||
name="size"
|
||||
v-model="size"
|
||||
:min="16"
|
||||
:max="48"
|
||||
:max="256"
|
||||
:step="4"
|
||||
/>
|
||||
</InputField>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { ref, inject, Ref } from 'vue';
|
||||
|
||||
export const ICON_STYLE_CONTEXT = Symbol('size');
|
||||
export const ICON_STYLE_CONTEXT = Symbol('style');
|
||||
|
||||
interface IconSizeContext {
|
||||
size: Ref<number>;
|
||||
|
||||
@@ -5,7 +5,27 @@
|
||||
],
|
||||
"tags": [
|
||||
"fruit",
|
||||
"food"
|
||||
"food",
|
||||
"healthy",
|
||||
"snack",
|
||||
"nutrition",
|
||||
"fresh",
|
||||
"produce",
|
||||
"grocery",
|
||||
"organic",
|
||||
"harvest",
|
||||
"vitamin",
|
||||
"red",
|
||||
"green",
|
||||
"juicy",
|
||||
"sweet",
|
||||
"tart",
|
||||
"bite",
|
||||
"orchard",
|
||||
"plant",
|
||||
"core",
|
||||
"raw",
|
||||
"diet"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z" />
|
||||
<path d="M10 2c1 .5 2 2 2 5" />
|
||||
<path d="M12 6.528V3a1 1 0 0 1 1-1h0" />
|
||||
<path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 416 B |
25
icons/circle-star.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"tags": [
|
||||
"badge",
|
||||
"medal",
|
||||
"honour",
|
||||
"decoration",
|
||||
"order",
|
||||
"pin",
|
||||
"laurel",
|
||||
"trophy",
|
||||
"medallion",
|
||||
"insignia",
|
||||
"bronze",
|
||||
"silver",
|
||||
"gold"
|
||||
],
|
||||
"categories": [
|
||||
"sports",
|
||||
"gaming"
|
||||
]
|
||||
}
|
||||
14
icons/circle-star.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="M11.051 7.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.867l-1.156-1.152a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" />
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 576 B |
23
icons/kayak.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"jguddas",
|
||||
"jpjacobpadilla"
|
||||
],
|
||||
"tags": [
|
||||
"kayak",
|
||||
"boat",
|
||||
"paddle",
|
||||
"water",
|
||||
"sport",
|
||||
"recreation",
|
||||
"adventure",
|
||||
"outdoors",
|
||||
"equipment",
|
||||
"lake",
|
||||
"ocean"
|
||||
],
|
||||
"categories": [
|
||||
"transportation"
|
||||
]
|
||||
}
|
||||
16
icons/kayak.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="M18 17a1 1 0 0 0-1 1v1a2 2 0 1 0 2-2z" />
|
||||
<path d="M20.97 3.61a.45.45 0 0 0-.58-.58C10.2 6.6 6.6 10.2 3.03 20.39a.45.45 0 0 0 .58.58C13.8 17.4 17.4 13.8 20.97 3.61" />
|
||||
<path d="m6.707 6.707 10.586 10.586" />
|
||||
<path d="M7 5a2 2 0 1 0-2 2h1a1 1 0 0 0 1-1z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 482 B |
@@ -4,7 +4,8 @@
|
||||
"colebemis",
|
||||
"csandman",
|
||||
"ericfennis",
|
||||
"karsa-mistmere"
|
||||
"karsa-mistmere",
|
||||
"LieOnLion"
|
||||
],
|
||||
"tags": [
|
||||
"record",
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<line x1="2" x2="22" y1="2" y2="22" />
|
||||
<path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2" />
|
||||
<path d="M5 10v2a7 7 0 0 0 12 5" />
|
||||
<path d="M12 19v3" />
|
||||
<path d="M15 9.34V5a3 3 0 0 0-5.68-1.33" />
|
||||
<path d="M16.95 16.95A7 7 0 0 1 5 12v-2" />
|
||||
<path d="M18.89 13.23A7 7 0 0 0 19 12v-2" />
|
||||
<path d="m2 2 20 20" />
|
||||
<path d="M9 9v3a3 3 0 0 0 5.12 2.12" />
|
||||
<line x1="12" x2="12" y1="19" y2="22" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 439 B |
@@ -3,6 +3,9 @@
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
],
|
||||
"deprecated": true,
|
||||
"deprecationReason": "icon.brand",
|
||||
"toBeRemovedInVersion": "v1.0",
|
||||
"tags": [
|
||||
"railway",
|
||||
"train",
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M14 22v-4a2 2 0 1 0-4 0v4" />
|
||||
<path d="m18 10 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7.382a1 1 0 0 1 .553-.894L6 10" />
|
||||
<path d="M18 5v17" />
|
||||
<path d="m4 6 7.106-3.553a2 2 0 0 1 1.788 0L20 6" />
|
||||
<path d="M6 5v17" />
|
||||
<path d="M14 21v-3a2 2 0 0 0-4 0v3" />
|
||||
<path d="M18 5v16" />
|
||||
<path d="m4 6 7.106-3.79a2 2 0 0 1 1.788 0L20 6" />
|
||||
<path d="m6 11-3.52 2.147a1 1 0 0 0-.48.854V19a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a1 1 0 0 0-.48-.853L18 11" />
|
||||
<path d="M6 5v16" />
|
||||
<circle cx="12" cy="9" r="2" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 496 B |
@@ -2,7 +2,8 @@
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley",
|
||||
"karsa-mistmere"
|
||||
"karsa-mistmere",
|
||||
"jguddas"
|
||||
],
|
||||
"tags": [
|
||||
"shape",
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M5 9c-1.5 1.5-3 3.2-3 5.5A5.5 5.5 0 0 0 7.5 20c1.8 0 3-.5 4.5-2 1.5 1.5 2.7 2 4.5 2a5.5 5.5 0 0 0 5.5-5.5c0-2.3-1.5-4-3-5.5l-7-7-7 7Z" />
|
||||
<path d="M12 18v4" />
|
||||
<path d="M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 401 B |
25
icons/square-star.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"tags": [
|
||||
"badge",
|
||||
"medal",
|
||||
"honour",
|
||||
"decoration",
|
||||
"order",
|
||||
"pin",
|
||||
"laurel",
|
||||
"trophy",
|
||||
"medallion",
|
||||
"insignia",
|
||||
"bronze",
|
||||
"silver",
|
||||
"gold"
|
||||
],
|
||||
"categories": [
|
||||
"sports",
|
||||
"gaming"
|
||||
]
|
||||
}
|
||||
14
icons/square-star.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="M11.035 7.69a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.866l-1.156-1.153a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" />
|
||||
<rect x="3" y="3" width="18" height="18" rx="2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 592 B |
@@ -9,9 +9,7 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7" />
|
||||
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />
|
||||
<path d="M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4" />
|
||||
<path d="M2 7h20" />
|
||||
<path d="M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7" />
|
||||
<path d="M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5" />
|
||||
<path d="M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244" />
|
||||
<path d="M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 587 B |
@@ -7,7 +7,9 @@
|
||||
"tags": [
|
||||
"cancel",
|
||||
"close",
|
||||
"cross",
|
||||
"delete",
|
||||
"ex",
|
||||
"remove",
|
||||
"times",
|
||||
"clear",
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
"author": "Eric Fennis",
|
||||
"amdName": "lucide-preact",
|
||||
"main": "dist/cjs/lucide-preact.js",
|
||||
"main:umd": "dist/umd/lucide-preact.js",
|
||||
"module": "dist/esm/lucide-preact.js",
|
||||
"unpkg": "dist/umd/lucide-preact.min.js",
|
||||
"typings": "dist/lucide-preact.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@@ -7,6 +7,17 @@ const outputFileName = 'lucide-preact';
|
||||
const outputDir = 'dist';
|
||||
const inputs = [`src/lucide-preact.ts`];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
minify: true,
|
||||
},
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'cjs',
|
||||
inputs,
|
||||
@@ -21,10 +32,10 @@ const bundles = [
|
||||
];
|
||||
|
||||
const configs = bundles
|
||||
.map(({ inputs, outputDir, format, preserveModules }) =>
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map((input) => ({
|
||||
input,
|
||||
plugins: plugins({ pkg }),
|
||||
plugins: plugins({ pkg, minify }),
|
||||
external: ['preact'],
|
||||
output: {
|
||||
name: packageName,
|
||||
@@ -33,7 +44,7 @@ const configs = bundles
|
||||
dir: `${outputDir}/${format}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}.js`,
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
}),
|
||||
preserveModules,
|
||||
format,
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
"author": "Eric Fennis",
|
||||
"amdName": "lucide-react",
|
||||
"main": "dist/cjs/lucide-react.js",
|
||||
"main:umd": "dist/umd/lucide-react.js",
|
||||
"module": "dist/esm/lucide-react.js",
|
||||
"unpkg": "dist/umd/lucide-react.min.js",
|
||||
"typings": "dist/lucide-react.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
|
||||
@@ -10,6 +10,17 @@ const packageName = 'LucideReact';
|
||||
const outputFileName = 'lucide-react';
|
||||
const inputs = [`src/lucide-react.ts`];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir: 'dist/umd',
|
||||
minify: true,
|
||||
},
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir: 'dist/umd',
|
||||
},
|
||||
{
|
||||
format: 'cjs',
|
||||
inputs,
|
||||
@@ -43,6 +54,7 @@ const configs = bundles
|
||||
outputDir,
|
||||
outputFile,
|
||||
format,
|
||||
minify,
|
||||
preserveModules,
|
||||
entryFileNames,
|
||||
external = [],
|
||||
@@ -51,7 +63,7 @@ const configs = bundles
|
||||
inputs.map((input) => ({
|
||||
input,
|
||||
plugins: [
|
||||
...plugins({ pkg }),
|
||||
...plugins({ pkg, minify }),
|
||||
// Make sure we emit "use client" directive to make it compatible with Next.js
|
||||
preserveDirectives({
|
||||
include: 'src/DynamicIcon.ts',
|
||||
@@ -66,7 +78,7 @@ const configs = bundles
|
||||
dir: outputDir,
|
||||
}
|
||||
: {
|
||||
file: outputFile ?? `${outputDir}/${outputFileName}.js`,
|
||||
file: outputFile ?? `${outputDir}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
}),
|
||||
paths,
|
||||
entryFileNames,
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
"amdName": "lucide-vue-next",
|
||||
"source": "build/lucide-vue-next.js",
|
||||
"main": "dist/cjs/lucide-vue-next.js",
|
||||
"main:umd": "dist/umd/lucide-vue-next.js",
|
||||
"module": "dist/esm/lucide-vue-next.js",
|
||||
"unpkg": "dist/umd/lucide-vue-next.min.js",
|
||||
"typings": "dist/lucide-vue-next.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
|
||||
@@ -7,6 +7,17 @@ const outputFileName = 'lucide-vue-next';
|
||||
const outputDir = 'dist';
|
||||
const inputs = ['src/lucide-vue-next.ts'];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
minify: true,
|
||||
},
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'cjs',
|
||||
inputs,
|
||||
@@ -21,10 +32,10 @@ const bundles = [
|
||||
];
|
||||
|
||||
const configs = bundles
|
||||
.map(({ inputs, outputDir, format, preserveModules }) =>
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map((input) => ({
|
||||
input,
|
||||
plugins: plugins({ pkg }),
|
||||
plugins: plugins({ pkg, minify }),
|
||||
external: ['vue'],
|
||||
output: {
|
||||
name: packageName,
|
||||
@@ -33,7 +44,7 @@ const configs = bundles
|
||||
dir: `${outputDir}/${format}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}.js`,
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
}),
|
||||
format,
|
||||
preserveModules,
|
||||
|
||||