1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-10 15:57:07 +01:00

Allow for multiple PDF engines / support Phantom PDFs.

Start formalizing PDF generation apparatus and support a `--pdf`
parameter allowing the user to specify the flavor of PDF generation.
This commit is contained in:
hacksalot
2016-01-03 04:11:42 -05:00
parent 8d7cf32988
commit 0a8ee721e8
5 changed files with 58 additions and 50 deletions

View File

@ -52,6 +52,7 @@ Implementation of the 'generate' verb for HackMyResume.
_opts.theme = (opts.theme && opts.theme.toLowerCase().trim())|| 'modern';
_opts.prettify = opts.prettify === true ? _opts.prettify : false;
_opts.css = opts.css;
_opts.pdf = opts.pdf;
// If two or more files are passed to the GENERATE command and the TO
// keyword is omitted, the last file specifies the output file.
@ -112,9 +113,14 @@ Implementation of the 'generate' verb for HackMyResume.
, fName = PATH.basename(f, '.' + fType)
, theFormat;
var suffix = '';
if( targInfo.fmt.outFormat === 'pdf' && _opts.pdf ) {
suffix = chalk.green(' (with ' + _opts.pdf + ')');
}
_log( chalk.green('Generating ') +
chalk.green.bold(targInfo.fmt.outFormat.toUpperCase()) +
chalk.green(' resume: ') + chalk.green.bold( PATH.relative(process.cwd(), f )) );
chalk.green(' resume') + suffix + chalk.green(': ') + chalk.green.bold( PATH.relative(process.cwd(), f )) );
// If targInfo.fmt.files exists, this format is backed by a document.
// Fluent/FRESH themes are handled here.