mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-12-23 13:47:22 +00:00
Support recursive theme template loading.
This commit is contained in:
parent
307c37dc44
commit
228f14d06c
@ -44,6 +44,7 @@
|
||||
"minimist": "^1.2.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"moment": "^2.10.6",
|
||||
"recursive-readdir-sync": "^1.0.6",
|
||||
"underscore": "^1.8.3",
|
||||
"wkhtmltopdf": "^0.1.5",
|
||||
"xml-escape": "^1.0.0",
|
||||
|
@ -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, {
|
||||
|
Loading…
Reference in New Issue
Block a user