This repository was archived by the owner on Jan 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,6 @@ import { Plugin } from './Plugin'
12
12
import { Config } from './commands/args'
13
13
import { getRepoEditUrl } from './utils/repo-info'
14
14
15
- const DEFAULT_IGNORE = [
16
- 'readme.md' ,
17
- 'changelog.md' ,
18
- 'code_of_conduct.md' ,
19
- 'contributing.md' ,
20
- 'license.md' ,
21
- ]
22
-
23
- const ignoreFiles = ( arr : string [ ] ) =>
24
- [ '!**/node_modules/**' ] . concat ( arr . length > 0 ? arr : DEFAULT_IGNORE )
25
-
26
15
export const fromTemplates = ( file : string ) => path . join ( paths . templates , file )
27
16
28
17
const matchFilesWithSrc = ( config : Config ) => ( files : string [ ] ) => {
@@ -85,7 +74,7 @@ export class Entries {
85
74
const toMatch = matchFilesWithSrc ( config )
86
75
87
76
const files = await glob < string > ( toMatch ( arr ) , {
88
- ignore : ignoreFiles ( ignore ) ,
77
+ ignore : [ '**/node_modules/**' ] . concat ( ignore ) ,
89
78
onlyFiles : true ,
90
79
unique : true ,
91
80
nocase : true ,
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { omit } from './helpers'
9
9
import { BabelRC } from './babel-config'
10
10
11
11
const toOmit = [ '_' , '$0' , 'version' , 'help' ]
12
-
13
12
const defaultHtmlContext = {
14
13
lang : 'en' ,
15
14
}
@@ -25,6 +24,13 @@ export const loadConfig = async (args: Config): Promise<Config> => {
25
24
themeConfig : { } ,
26
25
htmlContext : defaultHtmlContext ,
27
26
menu : [ ] ,
27
+ ignore : [
28
+ 'readme.md' ,
29
+ 'changelog.md' ,
30
+ 'code_of_conduct.md' ,
31
+ 'contributing.md' ,
32
+ 'license.md' ,
33
+ ] ,
28
34
modifyBundlerConfig : ( config : any ) => config ,
29
35
modifyBabelRc : ( babelrc : BabelRC ) => babelrc ,
30
36
}
You can’t perform that action at this time.
0 commit comments