diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-24 18:54:20 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-24 18:54:20 +0100 |
commit | 1583ede3d7ae005f7bd399ab587ca9bddfe845ca (patch) | |
tree | 51620a7fa837c1160ef3c81d29b16211c8bbe6b5 /lib/utils | |
parent | 572994a17e24b51624437e5b0f5da44a6156ffd7 (diff) | |
download | gitbook-1583ede3d7ae005f7bd399ab587ca9bddfe845ca.zip gitbook-1583ede3d7ae005f7bd399ab587ca9bddfe845ca.tar.gz gitbook-1583ede3d7ae005f7bd399ab587ca9bddfe845ca.tar.bz2 |
Add Book.generateFile to output a pdf
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/fs.js | 8 | ||||
-rw-r--r-- | lib/utils/git.js | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/utils/fs.js b/lib/utils/fs.js index 51577c6..d81f3d0 100644 --- a/lib/utils/fs.js +++ b/lib/utils/fs.js @@ -64,8 +64,12 @@ var getFiles = function(path) { module.exports = { tmp: { - file: Q.denodeify(tmp.file.bind(tmp)), - dir: Q.denodeify(tmp.dir.bind(tmp)) + file: function() { + return Q.nfcall(tmp.file.bind(tmp)).get(0) + }, + dir: function() { + return Q.nfcall(tmp.dir.bind(tmp)).get(0) + } }, list: getFiles, stat: Q.denodeify(fs.stat), diff --git a/lib/utils/git.js b/lib/utils/git.js index 8b515ec..f6d33bb 100644 --- a/lib/utils/git.js +++ b/lib/utils/git.js @@ -59,7 +59,7 @@ function cloneGitRepo(host, ref) { // Create temporary folder to store git repos .then(function() { if (GIT_TMP) return; - return fs.tmp.dir().get(0) + return fs.tmp.dir() .then(function(_tmp) { GIT_TMP = _tmp; }); |