Fix #68: Make moveArtifacts merge directories #69
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.
See #68.
I have added a dependency on fs-move. As that is implemented in JS, I added type definitions to
src/custom_types
.Regarding the behavior:
moveArtifacts
now merges the directories when moving.If a file already exists in
dist
, it is not being overwritten. This matches the behavior I have noticed on plain astro where when a file exists inpublic
that would be replaced by the astro-generated page (e.g.,public/some_page/index.html
andsrc/pages/some_page.astro
both exist; only the generated html fromsrc/pages/some_page.astro
shows up in the final build).I don't know if there are any other cases where a file in
dist
should be overwritten - this should only happen if astro generated a file at the same path as qwik does.