Skip to content

Commit ba505d2

Browse files
authored
Merge pull request #178 from docsbydoxdox/feature/load-plugin-from-dir
[feat] Load plugin from directory.
2 parents b1c5f3d + 948457a commit ba505d2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/doxdox-core/src/loader.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export const loadPlugin = async <T>(
8181
try {
8282
if (await isFile(pathOrPackage)) {
8383
return await loadPluginFromFile(pathOrPackage);
84+
} else if (await isDirectory(pathOrPackage)) {
85+
return await loadPluginFromPackagePath(pathOrPackage);
8486
} else if (
8587
await isDirectory(
8688
join(
@@ -95,14 +97,6 @@ export const loadPlugin = async <T>(
9597
`${prefix}${pathOrPackage.replace(prefixPattern, '')}`
9698
)
9799
);
98-
} else if (
99-
await isDirectory(
100-
join(directory, pathOrPackage.replace(prefixPattern, ''))
101-
)
102-
) {
103-
return await loadPluginFromPackagePath(
104-
join(directory, pathOrPackage.replace(prefixPattern, ''))
105-
);
106100
}
107101
} catch (err) {
108102
if (process.env.DEBUG) {

0 commit comments

Comments
 (0)