cloudhead/less.js — pull request #955 by simonedeponti (2012-09-19 18:31:33+00:00)
Title: Adding source line numbers dumping support for debugging purposes, take 2

Added source line numbers printing support.

It will print, for each ruleset in the resulting CSS file, the LESS file and line number where the definition comes from, allowing one to reconstruct what generated a given CSS ruleset.

It has three working modes:
* ``--line-numbers=comments`` will print this information in a comment over the ruleset
* ``--line-numbers=mediaquery`` will print this information in a fake media query (to be used with FireLESS/FireSASS)
* ``--line-numbers=all`` will print both

On the browser, it can be set by doing either:
```javascript
window.less.dumpLineNumbers = 'comments'; // Comments mode
/* or */
window.less.dumpLineNumbers = 'mediaquery'; // Media query mode
/* or */
window.less.dumpLineNumbers = 'all'; // Both mode
```

Or by using the ``#!dumpLineNumbers:`` hash on the URL (where ```` is one of the three above).

This is the result of merging the (closed) pull requests #834 and #880, with unit tests gracefully provided by @agatronic in the middle.

All tests passing.