cassette
cassette copied to clipboard
dotLess does not handle semicolon parameter separator on mixins
According to Less specification, parameters in a mixin definition or call can be separated by commas or semicolons. In the latter case, the dotless compiler fails.
This makes Bootstrap 3 and other libraries unusable without modifications.
Maybe a Jurassic compiler based on less.js or even via node.js (but would need too many dependencies) can be used instead of dotless.
This has been opened on dotless repo too but no reply yet. I agree we should look for an alternative compiler to dotless coz it seems they'll be unable to keep development in sync with LESS. Node.js solution with lessc is possible (WinLess does it that way).
I've made some modifications to Cassette.Less in my fork (https://github.com/mcliment/cassette/tree/master/src/Cassette.Less) to use https://github.com/duncansmart/less.js-windows/tree/windows-script-host. This is ugly WIP and the original idea was to use Less.js inside Jurassic emulating the properties that the less compiler needs and not to use WSH which can be problematic.
I have Bootstrap 3 working using the same technique as Web Essentials Visual Studio plugin (I was going for guaranteed compatibility with WE). I created an alternate less compiler and am registering that instead of the original. It's not well battle tested yet, but all the unit tests from the original less compiler are passing. Since it's using the original less 1.4.2 JavaScript file it's 100% compatible with Less and relatively easy to upgrade, however, it is Windows only so won't work on Mono/Unix. https://github.com/elerch/Cassette.LessJs
@elerch Much more elegant than my ugly solution but basically is the same approach. Using the official LessJs compiler is the best way to ensure perfect results. Nice job.
Are there any details on how to implement a workaround? I just started setting up a project with Bootstrap 3 and Cassette and am getting this compilation error.
@jwynveen I think @elerch approach is the most reliable way to compile less files, it uses the official less compiler rather than dotless and is up to date with the latest version.
I think #433 will solve this Issue... also waiting for bootstrap 3 support.