mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 08:20:11 +00:00
Fix YML/JSON/PNG invalid output format warning.
Fixes #97 but we still need to support standalone PNG (ie, a PNG not generated as part of a .all output target).
This commit is contained in:
parent
90765bf90b
commit
ed0792e8f8
2
dist/verbs/build.js
vendored
2
dist/verbs/build.js
vendored
@ -242,12 +242,12 @@ Implementation of the 'build' verb for HackMyResume.
|
|||||||
fmt: targInfo.fmt.outFormat,
|
fmt: targInfo.fmt.outFormat,
|
||||||
file: PATH.relative(process.cwd(), f)
|
file: PATH.relative(process.cwd(), f)
|
||||||
});
|
});
|
||||||
|
_opts.targets = finished;
|
||||||
if (targInfo.fmt.files && targInfo.fmt.files.length) {
|
if (targInfo.fmt.files && targInfo.fmt.files.length) {
|
||||||
theFormat = _fmts.filter(function(fmt) {
|
theFormat = _fmts.filter(function(fmt) {
|
||||||
return fmt.name === targInfo.fmt.outFormat;
|
return fmt.name === targInfo.fmt.outFormat;
|
||||||
})[0];
|
})[0];
|
||||||
MKDIRP.sync(PATH.dirname(f));
|
MKDIRP.sync(PATH.dirname(f));
|
||||||
_opts.targets = finished;
|
|
||||||
ret = theFormat.gen.generate(_rezObj, f, _opts);
|
ret = theFormat.gen.generate(_rezObj, f, _opts);
|
||||||
} else {
|
} else {
|
||||||
theFormat = _fmts.filter(function(fmt) {
|
theFormat = _fmts.filter(function(fmt) {
|
||||||
|
@ -82,7 +82,7 @@ build = ( src, dst, opts ) ->
|
|||||||
try
|
try
|
||||||
tFolder = verifyTheme.call @, _opts.theme
|
tFolder = verifyTheme.call @, _opts.theme
|
||||||
theme = _opts.themeObj = loadTheme tFolder
|
theme = _opts.themeObj = loadTheme tFolder
|
||||||
addFreebieFormats theme
|
addFreebieFormats theme
|
||||||
catch ex
|
catch ex
|
||||||
newEx =
|
newEx =
|
||||||
fluenterror: HMSTATUS.themeLoad
|
fluenterror: HMSTATUS.themeLoad
|
||||||
@ -124,7 +124,7 @@ build = ( src, dst, opts ) ->
|
|||||||
rez = RConverter[ 'to' + toFormat ]( rez );
|
rez = RConverter[ 'to' + toFormat ]( rez );
|
||||||
@stat HMEVENT.afterInlineConvert, { file: sheetObjects[0].file, fmt: toFormat }
|
@stat HMEVENT.afterInlineConvert, { file: sheetObjects[0].file, fmt: toFormat }
|
||||||
|
|
||||||
# Add freebie formats to the theme
|
# Announce the theme
|
||||||
@stat HMEVENT.applyTheme, { r: rez, theme: theme }
|
@stat HMEVENT.applyTheme, { r: rez, theme: theme }
|
||||||
|
|
||||||
# Load the resume into a FRESHResume or JRSResume object
|
# Load the resume into a FRESHResume or JRSResume object
|
||||||
@ -194,13 +194,14 @@ single = ( targInfo, theme, finished ) ->
|
|||||||
fmt: targInfo.fmt.outFormat
|
fmt: targInfo.fmt.outFormat
|
||||||
file: PATH.relative(process.cwd(), f)
|
file: PATH.relative(process.cwd(), f)
|
||||||
|
|
||||||
|
_opts.targets = finished;
|
||||||
|
|
||||||
# If targInfo.fmt.files exists, this format is backed by a document.
|
# If targInfo.fmt.files exists, this format is backed by a document.
|
||||||
# Fluent/FRESH themes are handled here.
|
# Fluent/FRESH themes are handled here.
|
||||||
if targInfo.fmt.files && targInfo.fmt.files.length
|
if targInfo.fmt.files && targInfo.fmt.files.length
|
||||||
theFormat = _fmts.filter(
|
theFormat = _fmts.filter(
|
||||||
(fmt) -> return fmt.name == targInfo.fmt.outFormat )[0];
|
(fmt) -> return fmt.name == targInfo.fmt.outFormat )[0];
|
||||||
MKDIRP.sync( PATH.dirname( f ) ); # Ensure dest folder exists;
|
MKDIRP.sync( PATH.dirname( f ) ); # Ensure dest folder exists;
|
||||||
_opts.targets = finished;
|
|
||||||
ret = theFormat.gen.generate( _rezObj, f, _opts );
|
ret = theFormat.gen.generate( _rezObj, f, _opts );
|
||||||
|
|
||||||
# Otherwise this is an ad-hoc format (JSON, YML, or PNG) that every theme
|
# Otherwise this is an ad-hoc format (JSON, YML, or PNG) that every theme
|
||||||
|
Loading…
Reference in New Issue
Block a user