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

version 2.12.7 silently dropping some files in subfolders #594

Closed
iicuken opened this issue Jul 25, 2023 · 3 comments
Closed

version 2.12.7 silently dropping some files in subfolders #594

iicuken opened this issue Jul 25, 2023 · 3 comments

Comments

@iicuken
Copy link

iicuken commented Jul 25, 2023

i have this dir structure:
./
scripts.js js.min.js
lib/
1jquery.min.js jquery.form.min.js jquery.jgrowl.min.js owl.carousel.min.js
jquery-1.10.2.min.map jquery.jgrowl.map jquery.magnific-popup.min.js

when i am doing:
rm js.min.js; minify --recursive --bundle lib scripts.js -o js.min.js

in recent versions it silently drops jquery.magnific-popup.min.js when it in lib subfolder.
but when i copy jquery.magnific-popup.min.js in ./ folder its all ok:
rm js.min.js; minify --recursive --bundle lib jquery.magnific-popup.min.js
scripts.js -o js.min.js

I test prev versions just about month ago, it was no such problems.
map files in lib folder mean nothing here - when i delete them bug is in place

@tdewolff
Copy link
Owner

Thanks for reaching out, so your directory looks like:

- scripts.js
- js.min.js
- lib/
  - 1jquery.min.js
  - jquery.form.min.js
  - jquery.jgrowl.min.js
  - owl.carousel.min.js
  - jquery-1.10.2.min.map
  - jquery.jgrowl.map
  - jquery.magnific-popup.min.js

That is, only scripts.js is outside the lib/ directory? And only jquery.magnific-popup.min.js doesn't get bundled? What is the output when you use the --verbose flag? I cannot reproduce this bug unfortunately.

@iicuken
Copy link
Author

iicuken commented Aug 17, 2023

Good day.
Here test data for my issue: https://kyrsi-rzn.ru/minify_test.zip
Unzip and minify --recursive --bundle lib scripts.js -o js.min.js.
Then 'less js.min.js'. Search 'Kindle' - word part of lib/jquery.magnific-popup.min.js.
See that no such word in js.min.js so no lib/jquery.magnific-popup in js.min.js.
Then 'mv lib/jquery.magnific-popup.js . ' and 'rm js.min.js && minify --recursive --bundle lib scripts.js -o js.min.js'.
Then 'less js.min.js'. Search 'Kindle' - see that word is present and jquery.magnific-popup is now in js.min.js because it was in root folder not in subfolder.
So minify silently drops some files in subfolders.

I have minify version 2.12.8 now.

@tdewolff
Copy link
Owner

Thanks for the test case. It appeared that concatenating files caused an issue when the preceding file ends in a line comment, that is why the first line of lib/jquery.magnific-popup.js was commented and removed from the output. This should now be fixed!

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

No branches or pull requests

2 participants