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(sass.middleware({
src: '/sass',
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: /sass/some/path/file.scss
```
The old version of the code, given a setup of the following:
```javascript
app.use(sass.middleware({
src: '/sass',
dest: '/css'
}));
```
would have generated paths such as:
```
dest: '/css/css/some/path.css'
src: '/sass/css/some/path.scss'
```
You should be able to see the unnecessary '/css/' path structures within. This just makes things messy and for no real good reason.
| Name |
Last commit
|
Last update |
|---|---|---|
| bin | Loading commit data... | |
| examples | Loading commit data... | |
| lib | Loading commit data... | |
| libsass @ a83ea468 | ||
| precompiled | Loading commit data... | |
| test | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| .npmignore | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| CONTRIBUTING.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| README.md | Loading commit data... | |
| binding.cpp | Loading commit data... | |
| binding.gyp | Loading commit data... | |
| package.json | Loading commit data... | |
| rebuild.js | Loading commit data... | |
| sass.js | Loading commit data... | |
| sass_context_wrapper.cpp | Loading commit data... | |
| sass_context_wrapper.h | Loading commit data... | |
| test.js | Loading commit data... |