1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-10 15:57:07 +01:00

Fix path parsing issue on prev versions of Node.js.

Work around absence of path.parse in Node versions < v0.12. Addresses
#31 and #33.
This commit is contained in:
hacksalot
2015-12-24 16:18:38 -05:00
parent 79637b611a
commit 3d41528059
4 changed files with 18 additions and 14 deletions

View File

@ -1,6 +1,7 @@
(function() {
var PATH = require('path')
, parsePath = require('parse-filepath')
, MKDIRP = require('mkdirp')
, _opts = require('../core/default-options')
, FluentTheme = require('../core/theme')
@ -70,8 +71,8 @@
( (dst && dst.length && dst) || ['resume.all'] ).forEach( function(t) {
var to = PATH.resolve(t),
pa = PATH.parse(to),
fmat = pa.ext || '.all';
pa = parsePath(to),
fmat = pa.extname || '.all';
targets.push.apply(targets, fmat === '.all' ?
Object.keys( theTheme.formats ).map(function(k){