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: allow ignoring public assets with ignore options #945

Merged
merged 7 commits into from
Jul 14, 2023

Conversation

motea927
Copy link
Contributor

@motea927 motea927 commented Feb 15, 2023

add ignorePublic option to ignore public assets with a pattern (glob patterns)

πŸ”— Linked issue

#843

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Resolves #843
Add ignorePublic to ignore public assets with a pattern (glob patterns), it is very useful and saves a lot of time for production.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

add ignorePublic option to ignore public assets with a pattern (glob patterns)
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #945 (94667ce) into main (a3bf7e3) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #945      +/-   ##
==========================================
- Coverage   76.82%   76.81%   -0.02%     
==========================================
  Files          71       71              
  Lines        7323     7336      +13     
  Branches      726      727       +1     
==========================================
+ Hits         5626     5635       +9     
- Misses       1696     1699       +3     
- Partials        1        2       +1     
Impacted Files Coverage Ξ”
src/build.ts 85.80% <100.00%> (+0.40%) ⬆️

... and 1 file with indirect coverage changes

@pi0 pi0 changed the title feat: add ignorePublic option to ignore public assets with a pattern feat: allow ignoring public assets with ignore options Jul 14, 2023
@pi0
Copy link
Member

pi0 commented Jul 14, 2023

Hi dear @motea927 thanks for this PR and sorry it took long to be reviewed.

I have made some refactors on copy implementation to make it simpler and also merged the functionality with the (more universal) ignore option introduced in #1430 and added tests.

Merging with new option comes with slight inconsistency that ignore patterns should "not" be prefix with public/. I think we can fix it later since is a minor requirement.

@pi0 pi0 merged commit 5febdd3 into unjs:main Jul 14, 2023
6 checks passed
@pi0 pi0 mentioned this pull request Aug 4, 2023
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.

.nitroignore support
3 participants