Yeti-or / xjst-react-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Server Engine for XJST

npm i --save-dev xjst-react-server

Usage

'use strict';

const xrs = require('xjst-react-server');
const runtime = new xrs.Engine();

// LIVE
runtime.compile(/* templates */);
runtime.apply(/* bemjson */);

// BUNDLE
const fs = require('fs');

fs.writeFileSync('./bundle.xrs.js', xrs.generate(/* templates */));

const compiledTemplates = require('./bundle.xrs.js');
compiledTemplates.apply(/* bemjson */);

More docs and examples.

License MIT

About


Languages

Language:JavaScript 100.0%