Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Update event names in README.md to match code #157

Merged
merged 1 commit into from
May 30, 2018

Conversation

frenzzy
Copy link
Contributor

@frenzzy frenzzy commented May 30, 2018

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Docs and code uses different even names, see:
https://github.com/webpack-contrib/webpack-serve/blob/v1.0.2/index.js#L42-L48

Breaking Changes

Additional Info

@shellscape
Copy link
Contributor

Thanks 🍺

@shellscape shellscape merged commit 0ffba66 into webpack-contrib:master May 30, 2018
@frenzzy frenzzy deleted the patch-1 branch May 30, 2018 18:14
@frenzzy
Copy link
Contributor Author

frenzzy commented May 30, 2018

Btw, why do you convert stats to json here?
https://github.com/webpack-contrib/webpack-serve/blob/v1.0.2/index.js#L41

...
const json = stats.toJson();
if (stats.hasErrors()) {
  bus.emit('compiler-error', { json, compiler: comp });
}
...

Why not just pass the whole status object to compiler-* events?
Users may want to take only specific info in such cases, for example:

stats.toString({ all: false, errors: true, warnings: true, moduleTrace: true })

Using stats.toString() without arguments probably much slower because all possible info will be captured, if I understood correctly.

@frenzzy frenzzy changed the title Update event names in README.md to match the code Update event names in README.md to match code Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants