aboutsummaryrefslogtreecommitdiff
path: root/js/markdown
blob: 05a372a0a95e732dec17c281652bb34e9ec621d3 (plain)
  1. #!/usr/bin/env node
  2. var fs = require('fs');
  3. var util = require('util');
  4. var stmd = require('./stmd');
  5. file = process.argv[2] || '/dev/stdin';
  6. fs.readFile(file, 'utf8', function(err, data) {
  7. if (err) {
  8. return console.log(err);
  9. }
  10. var parser = new stmd.DocParser();
  11. var renderer = new stmd.HtmlRenderer();
  12. console.log(renderer.render(parser.parse(data)));
  13. });