diff --git a/packages/builder/src/ignore.js b/packages/builder/src/ignore.js index 23a86ac4be..984e7b4d8d 100644 --- a/packages/builder/src/ignore.js +++ b/packages/builder/src/ignore.js @@ -5,6 +5,7 @@ import ignore from 'ignore' export default class Ignore { constructor (options) { this.rootDir = options.rootDir + this.ignoreOptions = options.ignoreOptions this.addIgnoresRules() } @@ -17,7 +18,7 @@ export default class Ignore { const ignoreFile = path.resolve(this.rootDir, Ignore.IGNORE_FILENAME) if (fs.existsSync(ignoreFile) && fs.statSync(ignoreFile).isFile()) { this.ignoreFile = ignoreFile - this.ignore = ignore() + this.ignore = ignore(this.ignoreOptions) } } return this.ignoreFile diff --git a/packages/config/src/config/_common.js b/packages/config/src/config/_common.js index 4353254e8a..54806ad4e1 100644 --- a/packages/config/src/config/_common.js +++ b/packages/config/src/config/_common.js @@ -47,6 +47,7 @@ export default () => ({ alias: {}, // Ignores + ignoreOptions: undefined, ignorePrefix: '-', ignore: [ '**/*.test.*', diff --git a/packages/config/test/__snapshots__/options.test.js.snap b/packages/config/test/__snapshots__/options.test.js.snap index 6d2c98cd33..24fbfad74b 100644 --- a/packages/config/test/__snapshots__/options.test.js.snap +++ b/packages/config/test/__snapshots__/options.test.js.snap @@ -220,6 +220,7 @@ Object { "**/*.spec.*", "**/-*.*", ], + "ignoreOptions": undefined, "ignorePrefix": "-", "layoutTransition": Object { "mode": "out-in", diff --git a/packages/config/test/config/__snapshots__/index.test.js.snap b/packages/config/test/config/__snapshots__/index.test.js.snap index cb580ea01e..24ed8224f8 100644 --- a/packages/config/test/config/__snapshots__/index.test.js.snap +++ b/packages/config/test/config/__snapshots__/index.test.js.snap @@ -196,6 +196,7 @@ Object { "**/*.test.*", "**/*.spec.*", ], + "ignoreOptions": undefined, "ignorePrefix": "-", "layoutTransition": Object { "mode": "out-in", @@ -548,6 +549,7 @@ Object { "**/*.test.*", "**/*.spec.*", ], + "ignoreOptions": undefined, "ignorePrefix": "-", "layoutTransition": Object { "mode": "out-in",