Reputation: 796
We're using dotLess successfully with our project, we have lots of LESS files and use LESS itself to pull together different component files with the @import command, which works fine. Example:
@import 'common/_type.less';
Additionally, we use the @import (reference) syntax to allow Visual Studio's Web Essentials plugin to correctly load references for intellisense etc. Example:
@import (reference) '../components/_animations.less'; // reference only
Unfortunately, dotLess seems to fail when these (reference) statements are included, resulting in the less handler returning an empty file, and no traceable exceptions.
Any ideas?
Further info:
So we do a lot of themeing, which uses variable files to establish colors etc we run through all our less files. So our top level less file accessed in the browser might look like this (say theme-blue.less)
@import '_variables-default.less'
@import '_variables-blue.less'
@import '_master.less'
_master.less then contains further imports to prevent duplication across the themes:
@import 'mixins/_vendor-prefixes.less';
@import 'mixins/_clearfix.less';
... etc
Then what we end up with is the less files themselves that contain the reference statements.
So clearfix.less might reference mixins in vendor-prefixes.less, and that's where the @import (reference) comes in useful for intellisense:
@import (reference) '../mixins/_vendor-prefixes.less'; // reference only
Upvotes: 1
Views: 566
Reputation: 32037
[edit] @import (reference)
is now implemented in dotless 1.5. Upgrade to that version, and things should start to work.
Upvotes: 2