mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-04-19 14:20:25 +01:00
In recent commits, HackMyResume generation logic, much like the pilots in Top Gun who became too reliant on air-to-air missiles and lost the true art of dogfighting, has become dependent on file-based generation as implicit file assumptions have crept in. This commit reaffirms the file-less, string-based nature of the generation process and, as a side effect, adjusts the behavior of (binary) PDF generation to match.
32 lines
712 B
JavaScript
32 lines
712 B
JavaScript
/**
|
|
Definition of the HTMLGenerator class.
|
|
@license MIT. Copyright (c) 2015 James Devlin / FluentDesk.
|
|
@module html-generator.js
|
|
*/
|
|
|
|
(function() {
|
|
|
|
var TemplateGenerator = require('./template-generator')
|
|
, FS = require('fs-extra')
|
|
, HTML = require( 'html' )
|
|
, PATH = require('path');
|
|
|
|
var HtmlGenerator = module.exports = TemplateGenerator.extend({
|
|
|
|
init: function() {
|
|
this._super( 'html' );
|
|
},
|
|
|
|
/**
|
|
Copy satellite CSS files to the destination and optionally pretty-print
|
|
the HTML resume prior to saving.
|
|
*/
|
|
onBeforeSave: function( info ) {
|
|
return this.opts.prettify ?
|
|
HTML.prettyPrint( info.mk, this.opts.prettify ) : info.mk;
|
|
}
|
|
|
|
});
|
|
|
|
}());
|