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

feat!: improve flatten: false and rename to structured: true #57

Merged
merged 5 commits into from
Jun 3, 2023

Conversation

brunoimbrizi
Copy link
Contributor

@brunoimbrizi brunoimbrizi commented May 30, 2023

(Re-submitting after the git history snafu on #47)

This PR addresses #46

  • remove ../ from dir so dest reliably replaces the first folder in the path on .split('/')[0]
  • trim slashes from the path so destDir doesn't end up in the root folder
  • update test 'glob with dir': dest should be expected to contain dir when flatten: false

@sapphi-red
Copy link
Owner

Would you add these commits by cherry-pick?
82e69bd
3544728

@brunoimbrizi
Copy link
Contributor Author

Would you add these commits by cherry-pick? 82e69bd 3544728

Were those commits made to a protected branch? I don't think I have access to them. When opening the links on github I get the following warning:

⚠ This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

That's after doing:

$ git remote add sapphi-red https://github.com/sapphi-red/vite-plugin-static-copy.git
$ git fetch --all
$ git cherry-pick 82e69bd

fatal: bad revision '82e69bd'

@brunoimbrizi
Copy link
Contributor Author

Probably running git apply with these patches will work. https://github.com/sapphi-red/vite-plugin-static-copy/commit/3544728f42e659e76216894111f13c36552668e5.patch https://github.com/sapphi-red/vite-plugin-static-copy/commit/82e69bd7f35cf224a24dc55fdf48a99511f4f715.patch

Sorry, it didn't work.

$ git apply 3544728f42e659e76216894111f13c36552668e5.patch

error: patch failed: test/fixtures/vite.noflatten.config.ts:29
error: test/fixtures/vite.noflatten.config.ts: patch does not apply
error: patch failed: test/testcases.ts:158
error: test/testcases.ts: patch does not apply

It's my fault for getting rid of pr/47. Would you be okay with me copying the changes and recreating the commits in this PR?

@sapphi-red
Copy link
Owner

I'm fine with that 👍

@sapphi-red sapphi-red changed the title fix: trim slashes from dest when flatten false; add support to ../ fix!: improve flatten: false and rename to structured: true Jun 3, 2023
@sapphi-red sapphi-red changed the title fix!: improve flatten: false and rename to structured: true feat!: improve flatten: false and rename to structured: true Jun 3, 2023
@sapphi-red sapphi-red added the enhancement New feature or request label Jun 3, 2023
Copy link
Owner

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sapphi-red sapphi-red merged commit 81fed57 into sapphi-red:main Jun 3, 2023
@sapphi-red
Copy link
Owner

@brunoimbrizi I have released this as v0.16.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants