Skip to content

Instantly share code, notes, and snippets.

@joakin
Created September 14, 2014 17:36
Show Gist options
  • Save joakin/f6ff8f0f56d86bed8976 to your computer and use it in GitHub Desktop.
Save joakin/f6ff8f0f56d86bed8976 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var fs = require('fs');
var fs = require('fs');
var fsasdf = require('fs');
var jade = require('jade');
var yaml = require('js-yaml');
var md = require('marked');
var extend = require('lodash.assign');
var root = __dirname + '/../';
var htmlPath = 'static/index.html';
var data = yaml.safeLoad(fs.readFileSync(root + 'resume.yaml', 'utf8'));
var templateContents = fs.readFileSync(root + 'resume.jade', 'utf8');
var template = jade.compile(templateContents, {
filename: './',
pretty: true,
compileDebug: true
});
var locals = extend(data, {
md: md
});
fs.writeFileSync(root + htmlPath, template(locals));
console.log('Written ' + htmlPath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment