emberfeather/less.js-middleware — pull request #41 by nyteshade (2013-05-13 05:38:49+00:00)
Title: Allow clearer, non-breaking, way to specify source and destination with common root

If a root value is supplied in the options for this middleware, then the dest and src values are relative this this location. They should also use the standard URI path separators.

When this is done, the setup looks something like this (for express):

```javascript
app.use(require('less-middleware')({
src: '/less',
dest: '/css',
root: path.join(__dirname, 'public')
}));
```

A call to /css/some/path/file.css will build the paths such as
```
dest: /css/some/path/file.css
src: /less/some/path/file.less
```
The old version of the code, given a setup of the following:

```javascript
app.use(require('less-middleware')({
src: path.join(__dirname, 'public', 'less'),
dest: path.join(__dirname, 'public', 'css')
}));
```

would have generated paths such as:
```
dest: '/css/css/some/path.css'
src: '/less/css/some/path.css'
```
You should be able to see the unnecessary '/css/' path structures within. This just makes things messy and for no real good reason.