1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-04 09:21:05 +01:00

Relocate internal sources to HackMyAPI.

Move internal sources and related tests to:

https://github.com/hacksalot/HackMyAPI
This commit is contained in:
hacksalot
2016-01-24 09:55:04 -05:00
parent fa29f9794d
commit d3194fba19
61 changed files with 15 additions and 6109 deletions

View File

@ -1,37 +0,0 @@
/**
Definition of the JsonYamlGenerator class.
@module json-yaml-generator.js
@license MIT. Copyright (c) 2015 James Devlin / FluentDesk.
*/
(function() {
var BaseGenerator = require('./base-generator');
var FS = require('fs');
var YAML = require('yamljs');
/**
JsonYamlGenerator takes a JSON resume object and translates it directly to
JSON without a template, producing an equivalent YAML-formatted resume. See
also YamlGenerator (yaml-generator.js).
*/
var JsonYamlGenerator = module.exports = BaseGenerator.extend({
init: function(){
this._super( 'yml' );
},
invoke: function( rez, themeMarkup, cssInfo, opts ) {
return YAML.stringify( JSON.parse( rez.stringify() ), Infinity, 2 );
},
generate: function( rez, f, opts ) {
var data = YAML.stringify( JSON.parse( rez.stringify() ), Infinity, 2 );
FS.writeFileSync( f, data, 'utf8' );
}
});
}());