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

feat(boot): add more helper methods for model and application booters #5432

Merged
merged 4 commits into from
May 15, 2020

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented May 14, 2020

  1. This further simplifies how a main application can boot sub-applications. The idea was from @bajtos in one of the comments (I cannot find it anymore :-).

  2. Add model() to RepositoryMixin and use it for model booter (feat(cli): bind model classes during boot #5378 (comment))

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@raymondfeng raymondfeng requested a review from bajtos May 14, 2020 16:29
@raymondfeng raymondfeng changed the title feat(boot): add applicationBooter method to BootMixin feat(boot): add more helper methods for model and application booters May 14, 2020
Copy link
Contributor

@jannyHou jannyHou left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Thank you for converting my suggestions into a pull request!

The changes look mostly good to me, please get the final approval from code owners.

constructor() {
super();
this.projectRoot = __dirname;
this.applicationBooter(app);
Copy link
Member

Choose a reason for hiding this comment

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

Should the method name start with a verb, e.g. this.addApplicationBooter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, I choose a noun to be consistent with other methods.

packages/boot/src/mixins/boot.mixin.ts Show resolved Hide resolved
packages/repository/src/mixins/repository.mixin.ts Outdated Show resolved Hide resolved
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.

3 participants