-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ability to define prefix / suffix for TS module #2101
Ability to define prefix / suffix for TS module #2101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of comments 👍
"github.com/wailsapp/wails/v2/internal/fs" | ||
"github.com/wailsapp/wails/v2/internal/process" | ||
"github.com/wailsapp/wails/v2/pkg/clilogger" | ||
"github.com/wailsapp/wails/v2/pkg/commands/build" | ||
"github.com/wailsapp/wails/v2/cmd/wails/internal/utils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Go, you generally don't have ambiguous package names. In this instance you may want to call it "logutils" or something. It actually doesn't bother me so much, more an FYI 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great tip, thank you! will refactor it and keep it in mind!
Awesome work, thanks @OlegGulevskyy 👍 Just a note which might be worth to be discussed: Thoughts? |
That's a great call actually. |
Agreed, that's a good call! |
Perhaps |
|
Yeah that sounds good for me👍 |
Updated PR to use |
LGTM. One thing I'm going to suggest is a test in the |
Had busy few days with work, but got your comment, I haven't forgotten and will look into it! :) |
Added a simple use cases for automated testing, to make sure the entity is generated with prefix and suffix whenever one or the other is supplied. Thanks for your feedback and guidance, I appreciate it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small suggestions 👍
Also, please update the CHANGELOG in the website directory so it isn't missed next release 👍🙏 |
Co-authored-by: Lea Anthony <[email protected]>
Co-authored-by: Lea Anthony <[email protected]>
Co-authored-by: Lea Anthony <[email protected]>
Sure, all done! Let me know if the wording in changelog needs tweaking |
Awesome first issue PR! :D |
As discussed in the issue #2058 , this PR adds ability for the app developer to define
prefix
andsuffix
for their return entities from the backend. Those pref/suff will be used in the generatedmodels.ts
file, to avoid clash with JS reserved keywords.stderr
but I don't know any other better way, I'd love some guidance here.wails dev
/wails build
/wails generate module
. Please let me know if I missed any other.Some implementation details question:
Flag
andDescription
properties). Is this ok thing to do in Go lang? I thought of treating it as enum, because retyping it in all other places is error prone and if the flag needs to be changed - it can be just changed in one place and affect all the other.Please don't hesitate to say what's not idiomatic way to do things, what does not make sense or what does, I am a webdev with JS/TS background and Go is my new tool in the toolbox, so I am just learning and open to any feedback!
Thanks in advance