mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-03 21:07:07 +01:00
Refactor verbs to separate files.
This commit is contained in:
19
src/core/default-formats.js
Normal file
19
src/core/default-formats.js
Normal file
@ -0,0 +1,19 @@
|
||||
(function(){
|
||||
|
||||
var FLUENT = require('../hackmyapi');
|
||||
|
||||
/**
|
||||
Supported resume formats.
|
||||
*/
|
||||
module.exports = [
|
||||
{ name: 'html', ext: 'html', gen: new FLUENT.HtmlGenerator() },
|
||||
{ name: 'txt', ext: 'txt', gen: new FLUENT.TextGenerator() },
|
||||
{ name: 'doc', ext: 'doc', fmt: 'xml', gen: new FLUENT.WordGenerator() },
|
||||
{ name: 'pdf', ext: 'pdf', fmt: 'html', is: false, gen: new FLUENT.HtmlPdfGenerator() },
|
||||
{ name: 'md', ext: 'md', fmt: 'txt', gen: new FLUENT.MarkdownGenerator() },
|
||||
{ name: 'json', ext: 'json', gen: new FLUENT.JsonGenerator() },
|
||||
{ name: 'yml', ext: 'yml', fmt: 'yml', gen: new FLUENT.JsonYamlGenerator() },
|
||||
{ name: 'latex', ext: 'tex', fmt: 'latex', gen: new FLUENT.LaTeXGenerator() }
|
||||
];
|
||||
|
||||
}());
|
13
src/core/default-options.js
Normal file
13
src/core/default-options.js
Normal file
@ -0,0 +1,13 @@
|
||||
(function(){
|
||||
|
||||
module.exports = {
|
||||
theme: 'modern',
|
||||
prettify: { // ← See https://github.com/beautify-web/js-beautify#options
|
||||
indent_size: 2,
|
||||
unformatted: ['em','strong'],
|
||||
max_char: 80, // ← See lib/html.js in above-linked repo
|
||||
//wrap_line_length: 120, ← Don't use this
|
||||
}
|
||||
};
|
||||
|
||||
}());
|
13
src/core/load-source-resumes.js
Normal file
13
src/core/load-source-resumes.js
Normal file
@ -0,0 +1,13 @@
|
||||
(function(){
|
||||
|
||||
var FRESHResume = require('../core/fresh-resume');
|
||||
|
||||
module.exports = function loadSourceResumes( src, log, fn ) {
|
||||
return src.map( function( res ) {
|
||||
log( 'Reading '.info + 'SOURCE'.infoBold + ' resume: '.info +
|
||||
res.cyan.bold );
|
||||
return (fn && fn(res)) || (new FRESHResume()).open( res );
|
||||
});
|
||||
};
|
||||
|
||||
}());
|
Reference in New Issue
Block a user