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

@@ -1,12 +1,9 @@
import path from 'path'
import mkdirp from 'mkdirp'
var spawn = require('child_process').spawn
import { spawn } from 'child_process'
var phantomscript = path.join(__dirname, 'phantomscript.js')
module.exports = { process: processMermaid }
function processMermaid (files, _options, _next) {
var options = _options || {}
var outputDir = options.outputDir || process.cwd()
@@ -41,3 +38,5 @@ function processMermaid (files, _options, _next) {
phantom.stdout.pipe(process.stdout)
})
}
export default { process: processMermaid }