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

Support recursive theme template loading.

This commit is contained in:
devlinjd
2015-12-06 18:19:33 -05:00
parent 307c37dc44
commit 228f14d06c
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,8 @@ Abstract theme representation.
, _ = require('underscore')
, PATH = require('path')
, EXTEND = require('../utils/extend')
, moment = require('moment');
, moment = require('moment')
, recursiveReadSync = require('recursive-readdir-sync');
/**
The Theme class is a representation of a FluentCV theme asset.
@ -42,7 +43,7 @@ Abstract theme representation.
// Iterate over all files in the theme folder, producing an array, fmts,
// containing info for each file.
var tplFolder = PATH.join( themeFolder, 'src' );
var fmts = FS.readdirSync( tplFolder ).map( function( file ) {
var fmts = recursiveReadSync( tplFolder ).map( function( file ) {
var absPath = PATH.join( tplFolder, file );
var pathInfo = PATH.parse(absPath);
var temp = [ pathInfo.name, {