Replace require with import

This commit is contained in:
Tyler Long
2017-09-10 21:23:04 +08:00
parent c9442653e9
commit a7d79baf00
36 changed files with 693 additions and 838 deletions

View File

@@ -6,6 +6,7 @@ import he from 'he'
import mermaidAPI from './mermaidAPI'
import { logger } from './logger'
import pkg from '../package.json'
var nextId = 0
@@ -110,7 +111,7 @@ var init = function () {
}
const version = function () {
return 'v' + require('../package.json').version
return 'v' + pkg.version
}
const initialize = function (config) {