mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-05 09:56: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",
|
"minimist": "^1.2.0",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"moment": "^2.10.6",
|
"moment": "^2.10.6",
|
||||||
|
"recursive-readdir-sync": "^1.0.6",
|
||||||
"underscore": "^1.8.3",
|
"underscore": "^1.8.3",
|
||||||
"wkhtmltopdf": "^0.1.5",
|
"wkhtmltopdf": "^0.1.5",
|
||||||
"xml-escape": "^1.0.0",
|
"xml-escape": "^1.0.0",
|
||||||
|
@ -11,7 +11,8 @@ Abstract theme representation.
|
|||||||
, _ = require('underscore')
|
, _ = require('underscore')
|
||||||
, PATH = require('path')
|
, PATH = require('path')
|
||||||
, EXTEND = require('../utils/extend')
|
, 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.
|
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,
|
// Iterate over all files in the theme folder, producing an array, fmts,
|
||||||
// containing info for each file.
|
// containing info for each file.
|
||||||
var tplFolder = PATH.join( themeFolder, 'src' );
|
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 absPath = PATH.join( tplFolder, file );
|
||||||
var pathInfo = PATH.parse(absPath);
|
var pathInfo = PATH.parse(absPath);
|
||||||
var temp = [ pathInfo.name, {
|
var temp = [ pathInfo.name, {
|
||||||
|
Loading…
Reference in New Issue
Block a user