koa-jsx

undefined

koa-jsx

koa middleware for transforming jsx of react

usage

var koa = require('koa');
var jsx= require('koa-jsx');
app.use(jsx(__dirname,{
  reactTools: require('react-tools')
}));

api

jsx

middleware for koa

GeneratorFunction jsx(dir:String, option: Object)
name type description
dir String load js file at path (dir + url), if this file's first line contains /** @jsx React.DOM */, then transform its content into normal javascript and output to browser.
option Object option config
option.reactTools Object require('react-tools') module exports

Repository

http://github.com/yiminghe/koa-jsx.git


相关推荐