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

chore: decaffeinate: rename error.coffee and 58 other files from .coffee to .js

This commit is contained in:
decaffeinate
2018-02-13 20:41:59 -05:00
committed by hacksalot
parent 73c5674af8
commit b7cd01597e
59 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,31 @@
###*
Definition of the JsonYamlGenerator class.
@module generators/json-yaml-generator
@license MIT. See LICENSE.md for details.
###
BaseGenerator = require('./base-generator')
FS = require('fs')
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).
###
module.exports = class JsonYamlGenerator extends BaseGenerator
constructor: () -> super 'yml'
invoke: ( rez, themeMarkup, cssInfo, opts ) ->
YAML.stringify JSON.parse( rez.stringify() ), Infinity, 2
generate: ( rez, f, opts ) ->
data = YAML.stringify JSON.parse( rez.stringify() ), Infinity, 2
FS.writeFileSync f, data, 'utf8'
data