Skip to content

Instantly share code, notes, and snippets.

@Naatan
Last active June 14, 2017 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Naatan/9534778 to your computer and use it in GitHub Desktop.
Save Naatan/9534778 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