mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-10 07:47:07 +01:00
Capture.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/**
|
||||
Implementation of the 'analyze' verb for HackMyResume.
|
||||
@module create.js
|
||||
@module verbs/analyze
|
||||
@license MIT. See LICENSE.md for details.
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
Implementation of the 'build' verb for HackMyResume.
|
||||
@module generate.js
|
||||
@module verbs/build
|
||||
@license MIT. See LICENSE.md for details.
|
||||
*/
|
||||
|
||||
@ -33,17 +33,19 @@ Implementation of the 'build' verb for HackMyResume.
|
||||
|
||||
|
||||
|
||||
/**
|
||||
An invokable resume generation command.
|
||||
*/
|
||||
/** An invokable resume generation command. */
|
||||
var BuildVerb = module.exports = Verb.extend({
|
||||
|
||||
/** Create a new build verb. */
|
||||
init: function() {
|
||||
this._super('build');
|
||||
},
|
||||
|
||||
/** Invoke the Build command. */
|
||||
invoke: function() {
|
||||
this.stat( HME.begin, { cmd: 'build' } );
|
||||
build.apply( this, arguments );
|
||||
this.stat( HME.end );
|
||||
}
|
||||
|
||||
});
|
||||
@ -60,10 +62,18 @@ Implementation of the 'build' verb for HackMyResume.
|
||||
*/
|
||||
function build( src, dst, opts ) {
|
||||
|
||||
this.stat( HME.begin );
|
||||
|
||||
if( !src || !src.length ) { this.err( HACKMYSTATUS.resumeNotFound ); }
|
||||
|
||||
prep( src, dst, opts );
|
||||
|
||||
// Load input resumes...
|
||||
var sheets = ResumeFactory.load(src, {
|
||||
format: null, objectify: true, throw: true, inner: { sort: _opts.sort }
|
||||
}, this).map( function(sh) {
|
||||
return sh.rez;
|
||||
});
|
||||
|
||||
// Load the theme...we do this first because the theme choice (FRESH or
|
||||
// JSON Resume) determines what format we'll convert the resume to.
|
||||
this.stat( HME.beforeTheme, { theme: _opts.theme });
|
||||
@ -77,13 +87,6 @@ Implementation of the 'build' verb for HackMyResume.
|
||||
this.err( HACKMYSTATUS.invalidFormat, { data: inv, theme: theme } );
|
||||
}
|
||||
|
||||
// Load input resumes...
|
||||
if( !src || !src.length ) { this.err( HACKMYSTATUS.resumeNotFound ); }
|
||||
var sheets = ResumeFactory.load(src, {
|
||||
format: theme.render ? 'JRS' : 'FRESH',
|
||||
objectify: true, throw: true, inner: { sort: _opts.sort }
|
||||
}, this).map( function(sh){ return sh.rez; });
|
||||
|
||||
// Merge input resumes...
|
||||
(sheets.length > 1) && this.stat( HME.beforeMerge, { f: _.clone(sheets) });
|
||||
rez = _.reduceRight( sheets, function( a, b, idx ) {
|
||||
@ -100,8 +103,6 @@ Implementation of the 'build' verb for HackMyResume.
|
||||
t.final = single.call( this, t, theme, targets );
|
||||
}, this);
|
||||
|
||||
this.stat( HME.end );
|
||||
|
||||
// Don't send the client back empty-handed
|
||||
return { sheet: rez, targets: targets, processed: targets };
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
Implementation of the 'convert' verb for HackMyResume.
|
||||
@module convert.js
|
||||
@module verbs/convert
|
||||
@license MIT. See LICENSE.md for details.
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
Implementation of the 'create' verb for HackMyResume.
|
||||
@module create.js
|
||||
@module verbs/create
|
||||
@license MIT. See LICENSE.md for details.
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
Implementation of the 'peek' verb for HackMyResume.
|
||||
@module peek.js
|
||||
@module verbs/peek
|
||||
@license MIT. See LICENSE.md for details.
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
Implementation of the 'validate' verb for HackMyResume.
|
||||
@module validate.js
|
||||
@module verbs/validate
|
||||
@license MIT. See LICENSE.md for details.
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
Definition of the Verb class.
|
||||
@module verb.js
|
||||
@module verbs/verb
|
||||
@license MIT. See LICENSE.md for details.
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user