File tree 4 files changed +13
-6
lines changed
4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ type DocumentationConfig = {
15
15
noReferenceLinks ? : boolean ,
16
16
markdownToc ?: boolean ,
17
17
documentExported ?: boolean ,
18
+ resolve ?: string ,
18
19
hljs ?: Object
19
20
} ;
20
21
Original file line number Diff line number Diff line change 124
124
"doc" : " node ./bin/documentation.js build src/index.js -f md --access=public > docs/NODE_API.md" ,
125
125
"self-lint" : " node ./bin/documentation.js lint src" ,
126
126
"test" : " npm run build && eslint . && flow check && jest" ,
127
- "test2" : " npm run build && flow check && jest" ,
128
127
"test-ci" : " npm run build && eslint . && flow check && jest --runInBand"
129
128
},
130
129
"jest" : {
Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ module.exports.sharedInputOptions = {
80
80
describe : 'The order to sort the documentation' ,
81
81
choices : [ 'source' , 'alpha' ] ,
82
82
default : 'source'
83
+ } ,
84
+ resolve : {
85
+ describe : 'Dependency resolution algorithm.' ,
86
+ choices : [ 'browser' , 'node' ] ,
87
+ default : 'browser'
83
88
}
84
89
} ;
85
90
Original file line number Diff line number Diff line change @@ -71,11 +71,13 @@ function dependencyStream(
71
71
} )
72
72
] ,
73
73
postFilter : moduleFilters . externals ( indexes , config ) ,
74
- resolve : ( id , opts , cb ) => {
75
- const r = require ( 'resolve' ) ;
76
- opts . basedir = path . dirname ( opts . filename ) ;
77
- r ( id , opts , cb ) ;
78
- }
74
+ resolve :
75
+ config . resolve === 'node' &&
76
+ ( ( id , opts , cb ) => {
77
+ const r = require ( 'resolve' ) ;
78
+ opts . basedir = path . dirname ( opts . filename ) ;
79
+ r ( id , opts , cb ) ;
80
+ } )
79
81
} ) ;
80
82
smartGlob ( indexes , config . parseExtension ) . forEach ( index => {
81
83
md . write ( path . resolve ( index ) ) ;
You can’t perform that action at this time.
0 commit comments