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
Adding an bundlestart event #1435
Adding an bundlestart event #1435
Conversation
src/Bundler.js
Outdated
@@ -207,7 +207,8 @@ class Bundler extends EventEmitter { | |||
}); | |||
}); | |||
} | |||
|
|||
this.emit('bundlestart', this.entryFiles) |
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.
We currently have a buildEnd
event when Bundler
is done, it would be more consistent to name this one buildStart
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.
Definitely makes sense
Just wondering, this won't block any action, so what's the actual use-case for this? |
Codecov Report
@@ Coverage Diff @@
## master #1435 +/- ##
==========================================
- Coverage 87.96% 87.55% -0.41%
==========================================
Files 80 80
Lines 4653 3809 -844
==========================================
- Hits 4093 3335 -758
+ Misses 560 474 -86
Continue to review full report at Codecov.
|
There are no use cases when running parcel via cli. But for embedding parcel in a larger scope it can be helpful to know when a new build started. For example I use a build server and used this event to set up a webhook. |
@Tom-Julux Alright :) I'll merge this in as it makes sense as we already print a message that build starts to cli, makes it available in the api as well :) |
I am just curious, when can this make it into the official release? |
It’ll be part of 1.9 Sent with GitHawk |
Plugins should be able to run code before a build process starts.
Plugins should be able to run code before a build process starts.
Plugins should be able to run code before a build process starts.