-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
how about just compress once for one image/assets #130
Comments
If the author agrees with the idea, I'd be happy to contribute😀 |
hi @buddywang Thank you for your use.
Of course, if all the above problems can be solved correctly, pr is welcome, or if you like, you can continue to optimize the cache function. |
hi, it just my initial thought, I'm going to study it and see how to implement it
If I want to contribute, will it be based on the main branch? |
@ErKeLost we can get git status like this |
oh, I probably understand your idea. If the local cache is stored in node_modules, the cache cannot be shared in this case. We may be able to provide two cache modes, one local and one git,fock main branch. pr welcome ! |
👌 |
After some thinking, I decided it would be more appropriate to make a framework-agnostic tool. I decided to implement it in a new project, thanks to the inspiration of this project.🤔 |
Well, it is possible that it would be better to make a separate tool, thank you. |
it already exists: @democrance/imagemin-lint-staged |
What problem does this feature solve?
for now, every image will be compressed in every build, this is a bit repetitive and wasteful
What does the proposed API look like?
use a extra file to record which files has been compressed before, and there will no compression for those file in next build
we can use git client-side hook like pre-commit to check whether there has image not being compressed and we can compress them an update the record-file, and interrupt the commit and ask to add a new commit for new compressed file
the extra file can use the hash value of the compressed file to determine whether the file has been compressed
The text was updated successfully, but these errors were encountered: