Add baseline Handlebars support.

This commit is contained in:
devlinjd committed 2015-12-06 16:19:55 -05:00
1 parent fb783cdbc6
commit 3b8d100f39
4 files changed
+204 -156

No files matched your search

+7 -2
View File
@@ -10,10 +10,11 @@ Abstract theme representation.
, validator = require('is-my-json-valid')
, _ = require('underscore')
, PATH = require('path')
, EXTEND = require('../utils/extend')
, moment = require('moment');
/**
The Theme class represents a specific presentation of a resume.
The Theme class is a representation of a FluentCV theme asset.
@class Theme
*/
function Theme() {
@@ -31,8 +32,12 @@ Abstract theme representation.
return friendly[val] || val;
}
// Remember the theme folder; might be custom
// Open the theme.json file; should have the same name as folder
this.folder = themeFolder;
var pathInfo = PATH.parse( themeFolder );
var themeFile = PATH.join( themeFolder, pathInfo.base + '.json' );
var themeInfo = JSON.parse( FS.readFileSync( themeFile, 'utf8' ) );
EXTEND( true, this, themeInfo );
// Iterate over all files in the theme folder, producing an array, fmts,
// containing info for each file.