Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

capitalize the first character of component name#272

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
SyMind wants to merge1 commit intor5n-labs:master
base:master
Choose a base branch
Loading
fromSyMind:master

Conversation

SyMind
Copy link

@SyMindSyMind commentedSep 5, 2022
edited
Loading

kpkonghk01, fahhadalsubaie, Yaronglp, and RakeshPotnuru reacted with thumbs up emojifahhadalsubaie reacted with heart emoji
@fahhadalsubaie
Copy link

Thank you for saving my time!

@@ -22,7 +22,7 @@
"",
"type State = {}",
"",
"export default class ${1:${TM_FILENAME_BASE}} extends Component<Props, State> {",
"export default class ${1:${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}} extends Component<Props, State> {",
Copy link

@YaronglpYaronglpDec 6, 2022
edited
Loading

Choose a reason for hiding this comment

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

You made a great change, but what would happen if I want to push another snippet? or if I will have another request for changes on the component's name?
I think we can optimize it.
I'm suggesting formatting the component name only in one place and reusing that place.
i.e, use theTM_FILENAME_BASE and capitalize it before using it on the generated.json.
Then you will do all your changes in one place and only once, instead of repeating the logic for every snippet.
what do you say?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@YaronglpYaronglpYaronglp left review comments

Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@SyMind@fahhadalsubaie@Yaronglp

[8]ページ先頭

©2009-2025 Movatter.jp