diff options
author | Soreine <nicolas@gitbook.com> | 2016-05-17 12:48:03 +0200 |
---|---|---|
committer | Soreine <nicolas@gitbook.com> | 2016-05-17 12:48:03 +0200 |
commit | 167d3957bf2caa1f46bc1b1ef5084fd468594c8d (patch) | |
tree | 4213d84826f73f25d8d3c12f6d48aad5a6da9c2c /lib/parse/parseIgnore.js | |
parent | a9571fd67d3d638d6d9d6c11a7e626c5600a68a2 (diff) | |
download | gitbook-167d3957bf2caa1f46bc1b1ef5084fd468594c8d.zip gitbook-167d3957bf2caa1f46bc1b1ef5084fd468594c8d.tar.gz gitbook-167d3957bf2caa1f46bc1b1ef5084fd468594c8d.tar.bz2 |
Expose lookup method for parsable files
Diffstat (limited to 'lib/parse/parseIgnore.js')
-rw-r--r-- | lib/parse/parseIgnore.js | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lib/parse/parseIgnore.js b/lib/parse/parseIgnore.js index d13663d..84d8c33 100644 --- a/lib/parse/parseIgnore.js +++ b/lib/parse/parseIgnore.js @@ -1,6 +1,23 @@ var Promise = require('../utils/promise'); var IGNORE_FILES = require('../constants/ignoreFiles'); +var DEFAULT_IGNORES = [ + // Skip Git stuff + '.git/', + + // Skip OS X meta data + '.DS_Store', + + // Skip stuff installed by plugins + 'node_modules', + + // Skip book outputs + '_book', + + // Ignore files in the templates folder + '_layouts' +]; + /** Parse ignore files @@ -15,22 +32,7 @@ function parseIgnore(book) { var fs = book.getFS(); var ignore = book.getIgnore(); - ignore = ignore.add([ - // Skip Git stuff - '.git/', - - // Skip OS X meta data - '.DS_Store', - - // Skip stuff installed by plugins - 'node_modules', - - // Skip book outputs - '_book', - - // Ignore files in the templates folder - '_layouts' - ]); + ignore = ignore.add(DEFAULT_IGNORES); return Promise.serie(IGNORE_FILES, function(filename) { return fs.readAsString(filename) |