mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-12 13:38:32 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c55aab36b5 | ||
|
|
bfe90f03d9 |
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"rrod497"
|
||||
],
|
||||
"use-cases": [
|
||||
"Phishing & Scam: Flag malicious links, fake websites, or deceptive social engineering tactics.",
|
||||
"Data Privacy Alert: Indicate risk of user data getting exposed, tracked, or lockdown by restrictive user agreements.",
|
||||
"Financial & Law Pitfalls: Represent risky investment schemes or contracts.",
|
||||
"Gaming: Gameplay icon for trap mechanics, field hazards, or skills that immobilize targets"
|
||||
],
|
||||
"tags": [
|
||||
"trap",
|
||||
"danger",
|
||||
"deception",
|
||||
"risk",
|
||||
"scam",
|
||||
"harm",
|
||||
"harmful",
|
||||
"security",
|
||||
"phishing",
|
||||
"pitfall",
|
||||
"hazard",
|
||||
"immobilize",
|
||||
"unsafe",
|
||||
"control",
|
||||
"injury",
|
||||
"hunt"
|
||||
],
|
||||
"categories": [
|
||||
"security",
|
||||
"tools"
|
||||
]
|
||||
}
|
||||
@@ -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="M10.056 15.528 3 12c-.8-.4-1-1-1-2a5 5 0 0 1 2-4l1 3h2.3l.7 2h2.2l1.123 3.118" />
|
||||
<path d="M13.944 15.528 21 12c.8-.4 1-1 1-2a5 5 90 0 0-2-4l-1 3h-2.3l-.7 2h-2.2l-1.123 3.118" />
|
||||
<path d="M7 18h10" />
|
||||
<circle cx="12" cy="16" r="2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 459 B |
@@ -37,9 +37,16 @@ const bundles = [
|
||||
|
||||
const typesModuleMatcher = /[/\\]src[/\\]types\.(d\.)?ts$/;
|
||||
|
||||
// With `preserveModules`, every output module would get its own license banner, which
|
||||
// repeats it ~2,000 times in consumer bundles (#3744). Every icon, and any direct use of
|
||||
// the `Icon` component, imports `Icon`, so keeping the banner only there includes it
|
||||
// exactly once in any bundle that renders an icon.
|
||||
const licenseModuleMatcher = /[/\\]src[/\\]Icon\.ts$/;
|
||||
const isNotLicenseChunk = (chunk) => !licenseModuleMatcher.test(chunk.facadeModuleId ?? '');
|
||||
|
||||
const configs = bundles.map(({ inputs, outputDir, format, preserveModules, extension = 'js' }) => ({
|
||||
input: inputs,
|
||||
plugins: plugins({ pkg }),
|
||||
plugins: plugins({ pkg, licenseBannerExclude: isNotLicenseChunk }),
|
||||
external: ['react', 'react-native-svg'],
|
||||
output: {
|
||||
name: packageName,
|
||||
|
||||
@@ -5,12 +5,33 @@ import esbuild from 'rollup-plugin-esbuild';
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
import summary from 'rollup-plugin-summary';
|
||||
|
||||
/**
|
||||
* Wraps a plugin's `renderChunk` hook so it is skipped for chunks matching `exclude`.
|
||||
* Used to keep the license banner to a single chunk that every consumer path imports,
|
||||
* instead of repeating it in every module emitted with `preserveModules`.
|
||||
*/
|
||||
const skipRenderChunk = (plugin, exclude) => {
|
||||
if (!exclude) return plugin;
|
||||
|
||||
const { renderChunk } = plugin;
|
||||
|
||||
return {
|
||||
...plugin,
|
||||
renderChunk(code, chunk, ...rest) {
|
||||
if (exclude(chunk)) return null;
|
||||
|
||||
return renderChunk.call(this, code, chunk, ...rest);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const plugins = ({
|
||||
pkg,
|
||||
minify = false,
|
||||
withEsbuild = true,
|
||||
esbuildOptions = {},
|
||||
withSummary = false,
|
||||
licenseBannerExclude,
|
||||
}) =>
|
||||
[
|
||||
withEsbuild
|
||||
@@ -23,12 +44,15 @@ const plugins = ({
|
||||
extensions: ['.js', '.ts', '.jsx', '.tsx'],
|
||||
resolveOnly: [/^@lucide\/.*$/],
|
||||
}),
|
||||
license({
|
||||
banner: `@license ${pkg.name} v${pkg.version} - ${pkg.license}
|
||||
skipRenderChunk(
|
||||
license({
|
||||
banner: `@license ${pkg.name} v${pkg.version} - ${pkg.license}
|
||||
|
||||
This source code is licensed under the ${pkg.license} license.
|
||||
See the LICENSE file in the root directory of this source tree.`,
|
||||
}),
|
||||
}),
|
||||
licenseBannerExclude,
|
||||
),
|
||||
withSummary ? summary() : null,
|
||||
visualizer({
|
||||
sourcemap: true,
|
||||
|
||||
Reference in New Issue
Block a user