Implement LibSass CSS preprocessor / deprecate LessCompiler
Our Sass compiler is old, slow and does not support newer sass constructs. We need a new Sass compiler that leverages libsass rather than a jruby implementation.
In order to use this new compiler, we will need to ship dotCMS the native libsass library connectors that are available in the jsass. https://github.com/bit3/jsass
there is also a new config property USE_LIBSASS_FOR_SASS_COMPILATION - defaults to true
Less support has been deprecated, as is the legacy sass compiler support that relied on jruby.
Passed QA. Tested on release-4.3.0 branch Mac OS 10.10 / Postgres 9.6.6 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8.6
I noticed that the old SassCompiler is still used as default. Looking at the code the use of DotLibSassCompiler seems to be commented out in release 4.3.1. See https://github.com/dotCMS/core/blob/bb81de4eeaa9de17a3ff6def339a115b7bd7d33e/dotCMS/src/main/java/com/dotcms/csspreproc/CSSPreProcessServlet.java#L87
Test case created here: http://qa.dotcms.com/index.php?/cases/view/62073
After testing this new compiler, we have problems refreshing changes in the files
-
If you made some changes in the files locally, and then upload again via webdav (override the originals), and then refresh the browser, we are able to see the changes
-
But if you made the changes via webdav (just editing the file) or via backed, and then refresh the browser, we are unable to see the changes
Testing in a Private mode with multiple browsers and have the same problem
PR ee (master) for fixing issue with runnable: https://github.com/dotCMS/enterprise-2.x/pull/592
PR: https://github.com/dotCMS/enterprise-2.x/pull/594
Note to QA: please make sure to test the imports with filenames with and without "_" at the beginning, both in the import and in the file
Fixed, tested after the last changes and now we are able to compile without the "_" prefix. Tested in the last master code // postgres // FF .
Also test cases where created here: http://qa.dotcms.com/index.php?/cases/view/62073 and the new example was uploaded to the QA repo on git: https://github.com/dotCMS/qa/tree/master/artifacts/SASS/scss.zip