Skip to content

Commit

Permalink
[minor] Adding example outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Feb 25, 2015
1 parent 4c67a7a commit 74211c6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict';

var path = require('path')
, jsx = require('./')
, fs = require('fs');

var template = fs.readFileSync(path.join(__dirname, 'fixtures', 'advanced.jsx'), 'utf-8')
, raw = jsx.server(template, { raw: true })
, server = jsx.server(template)
, client = jsx.client(template)
, data = { defaultValue: 10 };

console.log(raw(data));
console.log(server(data));
console.log(client.toString(data));

0 comments on commit 74211c6

Please sign in to comment.