express-cjsx
v0.1.1
Published
CoffeeScript React component view engine for Express
Downloads
3
Maintainers
Readme
express-cjsx
CoffeeScript React component view engine for Express to create isomorphic applications.
Requirements
- CoffeeScript ~1.9.0
- React ~0.13.3
Install
npm install express-cjsx
Usage
{createEngine} = require 'express-cjsx'
app = do express
app.set 'view engine', 'cjsx'
app.engine 'cjsx', do createEngine
Optional: Passing options
{createEngine} = require 'express-cjsx'
app = do express
app.set 'view engine', 'cjsx'
app.engine 'cjsx', createEngine extension: '.react.coffee'
Options
| Option | Values | Default |
| :---------- | :------------------------------------------------------ | --------------------: |
| extension
| Any file name extension with leading dot (i.e .cjsx
) | ".cjsx"
|
| beautify
| Beautify HTML markup, may affect performance | false|off|no
|
| doctype
| Any valid doctype, defaults to HTML5. | "<!DOCTYPE html>"
|