Created
September 14, 2014 17:36
-
-
Save joakin/f6ff8f0f56d86bed8976 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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