Skip to content

Commit de38301

Browse files
committed
initialize globals in the index file, so the Docsify.js file only exports the Docsify class
1 parent a88ff9a commit de38301

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/core/Docsify.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { routerMixin } from './router';
66
import { renderMixin } from './render';
77
import { fetchMixin } from './fetch';
88
import { eventMixin } from './event';
9-
import initGlobalAPI from './global-api';
109

1110
export class Docsify extends multiple(
1211
initMixin,
@@ -17,8 +16,3 @@ export class Docsify extends multiple(
1716
fetchMixin,
1817
eventMixin
1918
) {}
20-
21-
/**
22-
* Global API
23-
*/
24-
initGlobalAPI();

src/core/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { documentReady } from './util/dom';
22
import { Docsify } from './Docsify';
3+
import initGlobalAPI from './global-api';
4+
5+
initGlobalAPI();
36

47
/**
58
* Run Docsify

0 commit comments

Comments
 (0)