Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(spindle-ui): replace icon index imports with direct imports #1182

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kc7891
Copy link
Contributor

@kc7891 kc7891 commented Nov 28, 2024

経緯

close #1174

方法

ast-grepを用いて機械的に実行しました

id: fix-icon-imports
message: found target icon import
severity: info # error, warning, info, hint
language: Tsx
rule:
  pattern: import {$$$IDENTS} from '$ICON'
  regex: Icon'|Icon/
rewriters:
  - id: rewrite-identifier
    rule:
      pattern: $IDENT
      kind: identifier
    fix: import $IDENT from '$ICON/$IDENT';
transform:
  IMPORTS:
    rewrite:
      rewriters: [rewrite-identifier]
      source: $$$IDENTS
      joinBy: "\n"
fix: $IMPORTS

Copy link
Contributor

github-actions bot commented Nov 28, 2024

Visit the preview URL for this PR (updated for commit 7decf61):

https://ameba-spindle--pr1182-refactor-spindle-ico-xd586stu.web.app

(expires Fri, 03 Jan 2025 09:05:37 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e7521619a2dd5c653490c8246e81ec2a5c8f1435

Copy link

reg-suit bot commented Nov 28, 2024

reg-suit detected visual differences.

Check this report, and review them.

🔴 Changed 🔵 Passing
1 202
How can I change the check status? If reviewers approve this PR, the reg context status will be green automatically.

@kc7891 kc7891 force-pushed the refactor/spindle-icon-imports branch from 1e10a21 to 327c9c0 Compare November 28, 2024 09:25
@kc7891 kc7891 requested review from herablog and Alesion30 November 28, 2024 10:24
@Alesion30
Copy link

Alesion30 commented Dec 3, 2024

一部、置き換えができていないやつがありそうです・・👀

@kc7891 kc7891 force-pushed the refactor/spindle-icon-imports branch from e5c363e to 9e99c9d Compare December 4, 2024 08:36
@kc7891 kc7891 force-pushed the refactor/spindle-icon-imports branch from 9e99c9d to 7decf61 Compare December 4, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Iconインデックスファイルの参照方法によるバンドルサイズ増加とTree Shakingの課題
2 participants