I recently downloaded the JSMin plugin from ForgeBox with the intention of using it to compile LESS files into CSS at runtime in my application. The code all works but the compiled CSS output uses “\n” everywhere there was a line break in the source. This makes me think it is supposed to be consumed by JavaScript as the final step to get it to work. I was under the impression that the compiler would produce syntactically correct CSS that would be linked in the HTML source and work on the page but this does not appear to be the case. Do you have any insight into the piece I am missing?
This output is syntactically invalid CSS due to the inclusion of the “\n”. It seems like the CSS is being minified as JS instead of CSS. I expect an output along these lines:
I am even committing this as part of the sample test suite. Anyways, I am updating the version as I am adding a concurrency check right now. But I cannot reproduce your issue.
I am using JVM 1.6.0_43 with CF 9.0.1 and Hot Fix 4 applied and still no luck. I am going to give up for now and may revisit later. Thanks for your help!
I just ran the same code in DevBox on the Railo engine and it works as expected. It is very strange that it would add the “\n” when running it through ACF…
Finally figured it out! I am using the HTMLCompressor module and when it is removed, the “\n” characters disappear from the LESS output. I tried turning off some of the module settings but it seems to be built into the basic HTML compression.