Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pawndev/1be8fb3ebb966888aff5210d5f406fcf to your computer and use it in GitHub Desktop.
Save pawndev/1be8fb3ebb966888aff5210d5f406fcf to your computer and use it in GitHub Desktop.
var tmp = require('tmp');
var fs = require('fs');
var exec = require("child_process").exec;
tmp.file({postfix: ".md"}, function(err, path, fd) {
fs.writeFile(path, "* One\n* Two", function(err) {
if(err) return;
exec('github-markup ' + path, function (err, stdout, stderr) {
console.log(stdout);
console.log(path);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment