Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lucide-icons/lucide
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.350.0
Choose a base ref
...
head repository: lucide-icons/lucide
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.351.0
Choose a head ref
  • 3 commits
  • 8 files changed
  • 3 contributors

Commits on Mar 7, 2024

  1. Update cannabis.json (#1946)

    karsa-mistmere authored Mar 7, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    dd39fa3 View commit details

Commits on Mar 8, 2024

  1. Aliases redirect on site (#1959)

    * test aliases
    
    * test
    
    * Add redirect routes
    
    * Formatting
    ericfennis authored Mar 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    76d449a View commit details
  2. feat(icons): add briefcase-medical & briefcase-business (#1954)

    * feat(icons): add briefcase-medical & briefcase-business
    
    * chore(icons): add extra tag to briefcase-business.json
    
    ---------
    
    Co-authored-by: Karsa <karsa@sztaki.hu>
    karsa-mistmere and Karsa authored Mar 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    07aefe3 View commit details
Showing with 99 additions and 17 deletions.
  1. +19 −0 icons/briefcase-business.json
  2. +16 −0 icons/briefcase-business.svg
  3. +18 −0 icons/briefcase-medical.json
  4. +18 −0 icons/briefcase-medical.svg
  5. +2 −2 icons/briefcase.svg
  6. +1 −2 icons/cannabis.json
  7. +2 −1 scripts/writeIconDetails.mjs
  8. +23 −12 scripts/writeVercelOutput.mjs
19 changes: 19 additions & 0 deletions icons/briefcase-business.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"csandman",
"ericfennis",
"karsa-mistmere"
],
"tags": [
"work",
"bag",
"baggage",
"folder",
"portfolio"
],
"categories": [
"transportation"
]
}
16 changes: 16 additions & 0 deletions icons/briefcase-business.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions icons/briefcase-medical.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"csandman",
"ericfennis",
"karsa-mistmere"
],
"tags": [
"doctor",
"medicine",
"first aid"
],
"categories": [
"medical",
"transportation"
]
}
18 changes: 18 additions & 0 deletions icons/briefcase-medical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions icons/briefcase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions icons/cannabis.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@
"leaf"
],
"categories": [
"nature",
"smoking"
"nature"
]
}
3 changes: 2 additions & 1 deletion scripts/writeIconDetails.mjs
Original file line number Diff line number Diff line change
@@ -28,14 +28,15 @@ import iconNode from '../iconNodes/${iconName}.node.json'
import metaData from '../../../../icons/${iconName}.json'
import releaseData from '../releaseMetadata/${iconName}.json'
const { tags, categories, contributors } = metaData
const { tags, categories, contributors, aliases } = metaData
const iconDetails = {
name: '${iconName}',
iconNode,
contributors,
tags,
categories,
aliases,
...releaseData,
}
35 changes: 23 additions & 12 deletions scripts/writeVercelOutput.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
import path from 'path';
import fs from 'fs';
// eslint-disable-next-line import/no-named-as-default, import/no-named-as-default-member
import getIconMetaData from '../tools/build-icons/utils/getIconMetaData.mjs';
import { getCurrentDirPath } from './helpers.mjs';

const currentDir = process.cwd();
const scriptDir = getCurrentDirPath(import.meta.url);

const iconMetaData = await getIconMetaData(path.resolve(scriptDir, '../icons'));

const iconAliasesRedirectRoutes = Object.entries(iconMetaData)
.filter(([, { aliases }]) => aliases?.length)
.map(([iconName, { aliases }]) => {
const aliasRouteMatches = aliases.join('|');

return {
src: `/icons/(${aliasRouteMatches})`,
status: 302,
headers: {
Location: `/icons/${iconName}`,
},
};
});

const vercelRouteConfig = {
version: 3,
@@ -15,21 +35,12 @@ const vercelRouteConfig = {
src: '(?<url>/api/.*)',
dest: '/__nitro?url=$url',
},
// {
// source: '/icon/:path*',
// destination: '/icons/:path*',
// permanent: true,
// },
// {
// src: '/(.*)',
// status: 404,
// dest: '/static/404.html',
// },
...iconAliasesRedirectRoutes,
],
};

const output = JSON.stringify(vercelRouteConfig, null, 2);

const vercelOutputJosn = path.resolve(currentDir, '.vercel/output/config.json');
const vercelOutputJSON = path.resolve(currentDir, '.vercel/output/config.json');

fs.writeFileSync(vercelOutputJosn, output, 'utf-8');
fs.writeFileSync(vercelOutputJSON, output, 'utf-8');