8000 Init template by dhuckins · Pull Request #2728 · ent/ent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Init template #2728

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

Merged
merged 7 commits into from
Jul 27, 2022
Merged

Init template #2728

merged 7 commits into from
Jul 27, 2022

Conversation

dhuckins
Copy link
Contributor
@dhuckins dhuckins commented Jul 7, 2022

allows ent init ... to accept template string/file for new model creation

Copy link
Member
@a8m a8m left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @dhuckins! I actually like this feature a lot 🚀

Please, see my comment below.

Comment on lines 75 to 76
"ent init --template '<template string>'",
"ent init --template file=path/to/tmpl.tmpl",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"ent init --template '<template string>'",
"ent init --template file=path/to/tmpl.tmpl",
"ent init --template file=path/to/file.tmpl User",

Copy link
Member

Choose a reason for hiding this comment

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

Please, let's not support string template atm. It's not supported by ent generate and I don't see a use case for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thought I saw it elsewhere (?)

took a second look and couldn't find, will remove

Comment on lines 67 to 68
var target string
var newSchemaTemplate string
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
var target string
var newSchemaTemplate string
var target, tmpl string

Keep variable names short please.

@dhuckins dhuckins requested a review from a8m July 25, 2022 19:28
Copy link
Member
@a8m a8m left a comment

Choose a reason for hiding this comment

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

💯

Looks good. Please address the minor comments and let's merge it.

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
@dhuckins
Copy link
Contributor Author

@a8m suggestions applied! needs an approval from a contributor to run CI checks

thanks!

Copy link
Member
@a8m a8m left a comment

Choose a reason for hiding this comment

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

I love this feature a lot! Thanks again for adding this ❤️

@a8m a8m merged commit f9dfac6 into ent:master Jul 27, 2022
@a8m
Copy link
Member
a8m commented Jul 27, 2022

Please, you are welcome to join our Discord community.

@dhuckins dhuckins deleted the init-template branch July 27, 2022 18:31
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.

2 participants
0