jsxify
Do you like to use React, but not sold on inlining XML in your .js files? Use jsxify to convert plain html files into React.DOM calls!
Examples
- Convert HTML template
var jsxify = require('jsxify');
var React = require('react');
var component = React.createClass({
render: function(){
return jsxify('./component.html');
}
})
- Process .js files (in server.js or connect middleware, for example):
var jsxify = require('jsxify');
var path = require('path');
var http = require('http');
http.createServer(function(req, res){
res.send(jsxify(path.join(__dirname, req.url)));
}).listen(3000);