nuxt / nuxt/icon

[feature request] Allow aliasing entire collection

Open
#362 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.2k
Forks
96
Avg merge
8h 12m
Merged PRs (30d)
2

Description

It would be nice if you could alias and entire collection instead of just an icon.

Right now I do it this way.

const createIconAliases = (newPrefix: string, iconifyJson: IconifyJSON) => {
  const exisitngPrefix = iconifyJson.prefix;
  const icons = Object.keys(iconifyJson.icons);

  return icons.reduce(
    (object, value) => {
      object[`${newPrefix}:${value}`] = `${exisitngPrefix}:${value}`;
      return object;
    },
    {} as Record<string, string>,
  );
};

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing support for aliasing individual icons and compare it with the TypeScript example in the issue. Determine where collection-level aliasing belongs and verify that a collection alias makes its icons available under the new prefix without manually generating per-icon aliases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.