1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-22 08:20:11 +00:00

Remove redundant conditional.

This commit is contained in:
hacksalot 2016-01-11 08:20:48 -05:00
parent 0ecac98cff
commit b224c8939b

View File

@ -29,7 +29,6 @@ Definition of the HandlebarsGenerator class.
generate: function( json, jst, format, cssInfo, opts, theme ) { generate: function( json, jst, format, cssInfo, opts, theme ) {
registerPartials( format, theme ); registerPartials( format, theme );
@ -70,15 +69,12 @@ Definition of the HandlebarsGenerator class.
format format
); );
// Register global partials in the /partials folder // Register global partials in the /partials/[format] folder
// TODO: Only do this once per HMR invocation. // TODO: Only do this once per HMR invocation.
_.each( READFILES( partialsFolder, function(error){ }), function( el ) { _.each( READFILES( partialsFolder, function(error){ }), function( el ) {
var pathInfo = parsePath( el ); var pathInfo = parsePath( el );
var name = SLASH( PATH.relative( partialsFolder, el ) var name = SLASH( PATH.relative( partialsFolder, el )
.replace(/\.html$|\.xml$/, '') ); .replace(/\.html$|\.xml$/, '') );
if( pathInfo.dirname.endsWith('section') ) {
name = SLASH(name.replace(/\.html$|\.xml$/, ''));
}
var tplData = FS.readFileSync( el, 'utf8' ); var tplData = FS.readFileSync( el, 'utf8' );
var compiledTemplate = HANDLEBARS.compile( tplData ); var compiledTemplate = HANDLEBARS.compile( tplData );
HANDLEBARS.registerPartial( name, compiledTemplate ); HANDLEBARS.registerPartial( name, compiledTemplate );