linkedin / linkedin/icon-magic

Run icon-magic on a set of changed files

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
18
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Currently, icon magic can only run on directories (containing .iconrc files). Allow the option to pass in asset files to the CLI. This will allow us to run icon-magic only on a set of changed files within a repository.

This will entail
1. Figuring out if the changed file is an icon asset file or an icon config file.
2. If it as a config file
- Find all icons that the config file represents
- Get the sourceConfigFile from the iconrc in the output directory
- Check if the sourceConfigFile for the icon is still the config file that has changed. If so, add it to the iconset to be processed further
- if not, throw an error that the icon was generated with a different config file
3. If it is an icon asset file,
- Find the closest iconrc file
- Determine the iconPath from the iconrc file that pertains to the asset file
- Get the sourceConfigFile from the iconrc in the output directory
- Check if the sourceConfigFile for the icon is the same as the closest iconrc file found in step 1 and add it to the iconset to be processed further
- if not, throw an error that the icon was generated with a different config file

Contributor guide

No contributing guide indexed for this repository

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 at the CLI entry point that currently accepts directories and trace how .iconrc files, output icons, and sourceConfigFile metadata are resolved. Define the handling for changed config and asset files, including mismatched source configurations. Done means the CLI processes valid file inputs and reports the specified configuration errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.