diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-17 13:30:45 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-17 13:30:45 +0100 |
commit | 853ba6079c37aa747721c8ee5d014479e69f3ad9 (patch) | |
tree | 60f655c942bafdc3e2caa6867b62a2173708a30f /lib/output/base.js | |
parent | b6104c64fecb72c9f40554600d456c27dbd18be8 (diff) | |
download | gitbook-853ba6079c37aa747721c8ee5d014479e69f3ad9.zip gitbook-853ba6079c37aa747721c8ee5d014479e69f3ad9.tar.gz gitbook-853ba6079c37aa747721c8ee5d014479e69f3ad9.tar.bz2 |
Correctly clean and ignore output folder
Diffstat (limited to 'lib/output/base.js')
-rw-r--r-- | lib/output/base.js | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/output/base.js b/lib/output/base.js index 997b8da..6ac3d7e 100644 --- a/lib/output/base.js +++ b/lib/output/base.js @@ -27,18 +27,6 @@ function Output(book) { // Files to ignore in output this.ignore = Ignore(); - this.ignore.addPattern(_.compact([ - '.gitignore', - '.ignore', - '.bookignore', - - // The configuration file should not be copied in the output - this.book.config.path, - - // Structure file to ignore - this.book.summary.path, - this.book.langs.path - ])); } // Start the generation, for a parsed book @@ -105,7 +93,18 @@ Output.prototype.generate = function() { // Prepare the generation Output.prototype.prepare = function() { + this.ignore.addPattern(_.compact([ + '.gitignore', + '.ignore', + '.bookignore', + // The configuration file should not be copied in the output + this.book.config.path, + + // Structure file to ignore + this.book.summary.path, + this.book.langs.path + ])); }; // Write a page (parsable file), ex: markdown, etc |