mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +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 {
|
export default class Ignore {
|
||||||
constructor (options) {
|
constructor (options) {
|
||||||
this.rootDir = options.rootDir
|
this.rootDir = options.rootDir
|
||||||
|
this.ignoreOptions = options.ignoreOptions
|
||||||
this.addIgnoresRules()
|
this.addIgnoresRules()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ export default class Ignore {
|
|||||||
const ignoreFile = path.resolve(this.rootDir, Ignore.IGNORE_FILENAME)
|
const ignoreFile = path.resolve(this.rootDir, Ignore.IGNORE_FILENAME)
|
||||||
if (fs.existsSync(ignoreFile) && fs.statSync(ignoreFile).isFile()) {
|
if (fs.existsSync(ignoreFile) && fs.statSync(ignoreFile).isFile()) {
|
||||||
this.ignoreFile = ignoreFile
|
this.ignoreFile = ignoreFile
|
||||||
this.ignore = ignore()
|
this.ignore = ignore(this.ignoreOptions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.ignoreFile
|
return this.ignoreFile
|
||||||
|
@ -47,6 +47,7 @@ export default () => ({
|
|||||||
alias: {},
|
alias: {},
|
||||||
|
|
||||||
// Ignores
|
// Ignores
|
||||||
|
ignoreOptions: undefined,
|
||||||
ignorePrefix: '-',
|
ignorePrefix: '-',
|
||||||
ignore: [
|
ignore: [
|
||||||
'**/*.test.*',
|
'**/*.test.*',
|
||||||
|
@ -220,6 +220,7 @@ Object {
|
|||||||
"**/*.spec.*",
|
"**/*.spec.*",
|
||||||
"**/-*.*",
|
"**/-*.*",
|
||||||
],
|
],
|
||||||
|
"ignoreOptions": undefined,
|
||||||
"ignorePrefix": "-",
|
"ignorePrefix": "-",
|
||||||
"layoutTransition": Object {
|
"layoutTransition": Object {
|
||||||
"mode": "out-in",
|
"mode": "out-in",
|
||||||
|
@ -196,6 +196,7 @@ Object {
|
|||||||
"**/*.test.*",
|
"**/*.test.*",
|
||||||
"**/*.spec.*",
|
"**/*.spec.*",
|
||||||
],
|
],
|
||||||
|
"ignoreOptions": undefined,
|
||||||
"ignorePrefix": "-",
|
"ignorePrefix": "-",
|
||||||
"layoutTransition": Object {
|
"layoutTransition": Object {
|
||||||
"mode": "out-in",
|
"mode": "out-in",
|
||||||
@ -548,6 +549,7 @@ Object {
|
|||||||
"**/*.test.*",
|
"**/*.test.*",
|
||||||
"**/*.spec.*",
|
"**/*.spec.*",
|
||||||
],
|
],
|
||||||
|
"ignoreOptions": undefined,
|
||||||
"ignorePrefix": "-",
|
"ignorePrefix": "-",
|
||||||
"layoutTransition": Object {
|
"layoutTransition": Object {
|
||||||
"mode": "out-in",
|
"mode": "out-in",
|
||||||
|
Loading…
Reference in New Issue
Block a user