less.js
less.js copied to clipboard
Add predefined @version variable
Add a predefined variable with the version number in some form as its predefined value Currently when using less with an external tool - there is absolutely no way to extract what version is used Such a variable will allow me to place it in the development/debug environment into some content file in order to find out what the less version is
A built-in function (version) would be better than "special" variable. (More easy to implement, less burden for the compiler and more safe / backward-compatible).
function is great - it will be more LESS specific than a value as well
I considered trying to write this function but quickly discovered, while browsing the source, that the less.version attribute doesn't appear to be accessible from the less.tree attribute. It would seem that tree would need to be made aware of the version or its parent less object in order to access it.
I think it will be alot easier on the 2.0.0 branch - feel free to make a pull request against that branch.
I've switched to using more structured requires so passing in dependencies is easier.
Is this issue still up for grabs? I seems really dated, but the issue has not been closed yet.
Is it somehow possible to render the less version that was used to compile the css file into a comment of that css file?