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

fix: generate typed css module #534

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

trim21
Copy link
Contributor

@trim21 trim21 commented Apr 4, 2023

#473 (comment)

不太确定是不是需要

vite dev 的情况下会watch *.module.less 然后生成对应的 .d.ts.

试了一下似乎还是得生成 *.module.less.d.ts,生成 *.module.d.less.ts 并不能被正确识别...


这里构建失败是因为之前写的有bug... 这个 editorItemCursor 在runtime是不存在的。

需要 @FoundTheWOUT 修一下

src/pages/index/subject/[id]/components/WikiBeginnerEditor.tsx:84:34 - error TS2339: Property 'editorItemCursor' does not exist on type 'typeof import("C:/Users/Trim21/proj/bangumi/frontend/packages/website/src/pages/index/subject/[id]/components/WikiBeginnerEditor.module.less")'.

84         <Cursor className={style.editorItemCursor} />
                                    ~~~~~~~~~~~~~~~~


Found 1 error in src/pages/index/subject/[id]/components/WikiBeginnerEditor.tsx:84

看来还是有必要的(

@mergify
Copy link

mergify bot commented Apr 4, 2023

@trim21 this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Apr 4, 2023
@mergify mergify bot removed the conflict label Apr 4, 2023
@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2938c92) 82.43% compared to head (1fa6b2a) 82.43%.
Report is 82 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #534   +/-   ##
=======================================
  Coverage   82.43%   82.43%           
=======================================
  Files          98       98           
  Lines        5942     5942           
  Branches      459      459           
=======================================
  Hits         4898     4898           
  Misses       1038     1038           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trim21 trim21 marked this pull request as draft April 4, 2023 07:14
@@ -9,27 +9,27 @@ import style from './SubMenu.module.less';
const buildMenuBottom = (verb: '看' | '读' | '听' | '玩'): MenuItemType[] => [
{
key: 'do',
className: style['subMenuItem--do'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里之前写的也是错的,目前vite module的设置只会生成camalCase的class name

@trim21 trim21 marked this pull request as ready for review April 4, 2023 07:33
@trim21 trim21 changed the title Generate types css module fix: generate typed css module Apr 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

Preview Deployment

Build URL time
Sites netlify preview 2023-03-03 05:16:23Z
Storybook netlify preview 2023-03-03 05:18:03Z

@bangumi bangumi deleted a comment from github-actions bot Apr 4, 2023
@trim21 trim21 mentioned this pull request Apr 4, 2023
@mergify
Copy link

mergify bot commented Apr 4, 2023

@trim21 this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Apr 4, 2023
@mergify mergify bot removed the conflict label Apr 4, 2023
@mergify mergify bot added ci:lint:fail and removed waiting-approval waiting code reviewers to approval PR labels Apr 4, 2023
@mergify mergify bot added waiting-approval waiting code reviewers to approval PR and removed ci:lint:fail labels Apr 4, 2023
@mergify
Copy link

mergify bot commented Apr 5, 2023

@trim21 this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Apr 5, 2023
@mergify mergify bot removed the conflict label Apr 5, 2023
@mergify
Copy link

mergify bot commented May 1, 2023

@trim21 this pull request is now in conflict 😩

@mergify mergify bot added the conflict label May 1, 2023
@mergify mergify bot removed the conflict label Jul 16, 2023
@mergify
Copy link

mergify bot commented Jul 16, 2023

@trim21 this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Jul 16, 2023
@mergify mergify bot removed the conflict label Aug 23, 2023
@mergify
Copy link

mergify bot commented Aug 23, 2023

@trim21 this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Aug 23, 2023
@mergify mergify bot removed the conflict label Dec 19, 2023
Copy link

mergify bot commented Dec 19, 2023

@trim21 this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Dec 19, 2023
Copy link

mergify bot commented May 19, 2024

@trim21 this pull request is now in conflict 😩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflict size/XL waiting-approval waiting code reviewers to approval PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants