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

Rewrite CLI to use mixins for logging purposes #632

Merged
merged 3 commits into from
Sep 27, 2018
Merged

Conversation

ZauberNerd
Copy link
Contributor

@ZauberNerd ZauberNerd commented Sep 12, 2018

At the moment the CLI does not use a mixin and log output for build and
server is done in the hops-express and hops-webpack package.

Inspired by the CLI package in untool, we now use a CLI mixin which
takes care of logging for express and webpack.

TODO: With this PR the webpack readme will be removed - we should
make sure that the necessary information is retained someplace else.

Edit: The express and webpack readmes are now part of: #655

  • All commit messages adhere to the appropriate format in order to trigger a correct release
  • All code is written in untranspiled ECMAScript (ES 2017) and is formatted using prettier
  • Necessary unit tests are added in order to ensure correct behavior
  • Documentation has been added

dmbch
dmbch previously approved these changes Sep 13, 2018
Copy link
Contributor

@dmbch dmbch left a comment

Choose a reason for hiding this comment

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

LGTM!

jhiode
jhiode previously approved these changes Sep 26, 2018
Copy link
Contributor

@jhiode jhiode left a comment

Choose a reason for hiding this comment

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

LGTM 👍

}
}

module.exports = class CLIMixin {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could add extends Mixin here to make it clear(er) it's a mixin.

That would also be good in order to not break as soon as it is actually required to inherit from Mixin.
And thats what we are doing anywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we can - at least not while the mixin is still part of @untool/core, because then the CLI (which might be installed globally) will have a dependency to @untool/core.

But what we could do, is to make the Mixin a separate package in untool and then we could add it (or rather hops-mixin) as a dependency to the CLI package.

/cc @dmbch

Copy link
Contributor

Choose a reason for hiding this comment

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

As the Mixin base class is just a five-liner, I am opposed to releasing it separately. I personally think that for this very use-case, it is completely fine to have a standalone class.

Copy link
Contributor

@jhiode jhiode left a comment

Choose a reason for hiding this comment

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

LGTM

@ZauberNerd ZauberNerd merged commit 03f83a5 into master Sep 27, 2018
@ZauberNerd ZauberNerd deleted the mixinify-cli branch September 27, 2018 13:42
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.

None yet

3 participants