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

Perform clean just before emiting files to output dir #72

Merged
merged 3 commits into from Jan 26, 2018

Conversation

ChrisRAoW
Copy link
Contributor

Currently the files are removed at the beginning of the compiliing process. For production environments that isn't really what you want, because:

  • During compilation the assets aren't available
  • When compilation fails, assets are done.

So basically you want the old assets to be cleaned just before the new files are emitted to the output dir.

This PR does exactly that by using the event hook of the compiler named "emit".

The only thing you have to do is setting "beforeEmit" to true in the options.

@coveralls
Copy link

coveralls commented Jan 26, 2018

Coverage Status

Coverage decreased (-3.3%) to 87.156% when pulling 93cd388 on chrisschrijver:master into 01d8dda on johnagan:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.3%) to 87.156% when pulling a2f6a12 on chrisschrijver:master into 01d8dda on johnagan:master.

@ChrisRAoW ChrisRAoW mentioned this pull request Jan 26, 2018
@factoidforrest
Copy link

I really, really like this option. I have noticed many times that things end up in a weird state when a build fails.

Obviously, it's not the right choice some of the time, but sometimes you really need it.

@johnagan
Copy link
Owner

awesome addition. thank you!

@johnagan johnagan merged commit 6aa6525 into johnagan:master Jan 26, 2018
@ChrisRAoW
Copy link
Contributor Author

You're welcome. Happy to contribute.

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

5 participants