ensure document ready before init Docsify (#233)

This commit is contained in:
yelo 2017-08-15 23:35:27 +08:00 committed by cinwell.li
parent 190710733e
commit 10045249d3
2 changed files with 3 additions and 1 deletions

View File

@ -30,6 +30,7 @@
"pub": "sh build/release.sh"
},
"dependencies": {
"document-ready": "^2.0.1",
"marked": "^0.3.6",
"prismjs": "^1.6.0",
"tinydate": "^1.0.0",

View File

@ -1,3 +1,4 @@
import ready from 'document-ready'
import { initMixin } from './init'
import { routerMixin } from './router'
import { renderMixin } from './render'
@ -30,4 +31,4 @@ Docsify.version = '__VERSION__'
/**
* Run Docsify
*/
setTimeout(_ => new Docsify(), 0)
ready(_ => new Docsify())