File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 1
1
var _ = require ( 'lodash' ) ;
2
- var fs = require ( 'fs' ) ;
3
2
var path = require ( 'path' ) ;
4
3
var util = require ( 'util' ) ;
5
4
var glob = require ( 'glob' ) ;
@@ -44,19 +43,15 @@ module.exports = PluginLoader;
44
43
PluginLoader . prototype . detectPugins = function ( dir ) {
45
44
var self = this ;
46
45
46
+ // Every dir start with "apidoc-plugin-", because for the tests of apidoc-plugin-test.
47
+ var plugins ;
47
48
try {
48
- if ( dir === '/' ) {
49
- fs . accessSync ( dir + '.' ) ;
50
- } else {
51
- fs . accessSync ( dir + '/.' ) ;
52
- }
49
+ plugins = glob . sync ( dir + '/apidoc-plugin-*' ) ;
53
50
} catch ( e ) {
54
51
app . log . warn ( e ) ;
55
52
return ;
56
53
}
57
54
58
- // Every dir start with "apidoc-plugin-", because for the tests of apidoc-plugin-test.
59
- var plugins = glob . sync ( dir + '/apidoc-plugin-*' ) ;
60
55
if ( plugins . length === 0 ) {
61
56
dir = path . join ( dir , '..' ) ;
62
57
if ( dir === '/' || dir . substr ( 1 ) === ':\\' ) {
You can’t perform that action at this time.
0 commit comments