mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
feat(config): add ignoreOptions
for node-ignore
(#6597)
This commit is contained in:
parent
2f76e8e875
commit
9ada4e63a9
@ -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
|
||||
|
@ -47,6 +47,7 @@ export default () => ({
|
||||
alias: {},
|
||||
|
||||
// Ignores
|
||||
ignoreOptions: undefined,
|
||||
ignorePrefix: '-',
|
||||
ignore: [
|
||||
'**/*.test.*',
|
||||
|
@ -220,6 +220,7 @@ Object {
|
||||
"**/*.spec.*",
|
||||
"**/-*.*",
|
||||
],
|
||||
"ignoreOptions": undefined,
|
||||
"ignorePrefix": "-",
|
||||
"layoutTransition": Object {
|
||||
"mode": "out-in",
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user