mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 13:59:54 +02:00
Replace require with import
This commit is contained in:
@@ -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 }
|
||||
|
Reference in New Issue
Block a user