diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-26 22:19:17 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-26 22:19:17 +0100 |
commit | 22bae559db876600b3a417bd2070ee695f526edc (patch) | |
tree | 8b189463966d7fd05079a1f518bbf2cc41f820d5 /lib/book.js | |
parent | 5cee07ee8c819a4609dc7d6660586a05e2540f87 (diff) | |
download | gitbook-22bae559db876600b3a417bd2070ee695f526edc.zip gitbook-22bae559db876600b3a417bd2070ee695f526edc.tar.gz gitbook-22bae559db876600b3a417bd2070ee695f526edc.tar.bz2 |
Fix #273: clean the output without removing .git and .svn
Diffstat (limited to 'lib/book.js')
-rw-r--r-- | lib/book.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/book.js b/lib/book.js index 6a61753..481ca12 100644 --- a/lib/book.js +++ b/lib/book.js @@ -175,11 +175,15 @@ Book.prototype.generate = function(generator) { // Clean output folder .then(function() { - return fs.remove(that.options.output); + that.log.info("clean", that.options.generator, "generator"); + return fs.clean(that.options.output) + .progress(function(p) { + that.log.debug.ln("remove", p.file, "("+p.i+"/"+p.count+")"); + }) + .then(function() { + that.log.info.ok(); + }); }) - .then(function() { - return fs.mkdirp(that.options.output); - }) // Create generator .then(function() { |