Prevent overwriting the manifest in the first phase of the build #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since we store the optimization manifest in the
build
directory, and since it doesn't have a counterpart in thesource
directory theManifestResource
needs to behave a little differently than your average resource. Instead of reading a file fromsource
and writing it tobuild
we want to read frombuild
if the file already exists, so that we preserve the contents of that file through the first stage of the build.In one of my projects this PR takes a 22 minute build down to 2 minutes.
Fixes #60
Fixes #41, Closes #58 (Specifying the manifest path shouldn't be needed if we don't overwrite it, and storing it outside the build directory doesn't exactly make sense since it is an artifact of a particular build, or sequence of builds. To say it another way, if you used an existing manifest with an empty build directory you'd end up skipping optimization of images that would need to be optimized.)