blob: 31b7ce48af3c0778c5f10350e8dadf823fb4db0a (
plain)
- #!/usr/bin/env node
- var fs = require('fs');
- var util = require('util');
- var stmd = require('../lib/index.js');
- file = process.argv[2] || '/dev/stdin';
- fs.readFile(file, 'utf8', function(err, data) {
- if (err) {
- return console.log(err);
- }
- var parser = new stmd.DocParser();
- var renderer = new stmd.HtmlRenderer();
- process.stdout.write(renderer.render(parser.parse(data)));
- });
|