## Connect

`compiler`

## Compiler

The compiler middleware compiles files that have not yet been compiled, or have been modified. Good examples of this are sass and less, both of which compile to css. The compiled data is written to disk, and serving is delegated to the static middleware, therefore the dest should be accessible (or the same) as static's root option.

    connect.createServer(
        connect.compiler({ src: __dirname + '/public', enable: ['sass'] })
    );

### Options

    src      Root directory from which to compile files. Defaults to CWD.
    dest     Destination directory of compiled files, defaults to src or CWD.
    enable   Enabled compilers, currently supported are "sass", and "less".

### Supported Compilers

- sass
- less

### Environment Variables

    --compilerSrc
    --compilerDest

### Links

- Sass.js
- Less.js

### See Also

- staticProvider