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

watch gets into some kind of loop #18

Open
holyjak opened this issue Sep 21, 2018 · 1 comment
Open

watch gets into some kind of loop #18

holyjak opened this issue Sep 21, 2018 · 1 comment

Comments

@holyjak
Copy link

holyjak commented Sep 21, 2018

Hello! Thank you for this plugin!

However we experience one issue with it: it seems to get into a loop sometimes, minifying repeatedly even though the source file has not changed:

15:44:15 minify | minifying: screen.min.css
15:44:15 minify | assets: screen.css
15:44:15 minify | original size: 14630
15:44:15 minify | compressed size: 11681
15:44:15 minify | gzipped size: 2762
15:44:15 minify |
15:44:15 minify | minifying assets...
15:44:15 minify |
15:44:15 minify | minifying: screen.min.css
15:44:15 minify | assets: screen.css
15:44:15 minify | original size: 14630
15:44:15 minify | compressed size: 11681
15:44:15 minify | gzipped size: 2762
15:44:15 minify |
15:44:15 minify | minifying assets...
15:44:15 minify |
15:44:15 minify | minifying: screen.min.css
15:44:15 minify | assets: screen.css
15:44:15 minify | original size: 14630
15:44:15 minify | compressed size: 11681
15:44:15 minify | gzipped size: 2762

You see the input file size is unchanged. While this was running, I also confirmed its timestamp has not changed in the meantime:

🐟  ls -la resources/public/css/screen.css
-rw-r--r--  1 me  staff  14630 Sep 21 15:39 resources/public/css/screen.css
🐟  ls -la resources/public/css/screen.css
-rw-r--r--  1 me  staff  14630 Sep 21 15:39 resources/public/css/screen.css

Any idea what could be the issue?

Context

Config in project.clj:

:minify-assets [[:css {:source "resources/public/css/screen.css" :target "resources/public/css/screen.min.css"}]
                  [:css {:source "resources/public/css/print.css" :target "resources/public/css/print.min.css"}]
                  [:css {:source "resources/public/css/TeliaStyleguide/telia-styleguide.css" :target "resources/public/css/TeliaStyleguide/telia-styleguide.min.css"}]]

System:

  • java version "1.8.0_181"
  • Leiningen 2.8.1
  • OS X 10.13.6
  • lein-asset-minifier "0.4.4"

Thank you!

@yogthos
Copy link
Owner

yogthos commented Sep 23, 2018

Thanks for the heads up. Not sure what causes the resources to be recompiled when the files haven't changed assuming this happens while watching for changes during development. The watcher logic is here.

If the recompilation happens when using a build hook that might be due to lein task being run multiple times.

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