Fix code style issues

This commit is contained in:
Tyler Long
2017-04-13 20:50:22 +08:00
parent a2ce9e6a54
commit ab398c64a8
7 changed files with 269 additions and 268 deletions

View File

@@ -1,7 +1,7 @@
var os = require('os'),
fs = require('fs'),
path = require('path'),
spawn = require('child_process').spawn
// var os = require('os')
// var fs = require('fs')
var path = require('path')
var spawn = require('child_process').spawn
var mkdirp = require('mkdirp')
@@ -10,22 +10,22 @@ var phantomscript = path.join(__dirname, 'phantomscript.js')
module.exports = { process: processMermaid }
function processMermaid (files, _options, _next) {
var options = _options || {},
outputDir = options.outputDir || process.cwd(),
outputSuffix = options.outputSuffix || '',
next = _next || function () {},
phantomArgs = [
phantomscript,
outputDir,
options.png,
options.svg,
options.css,
options.sequenceConfig,
options.ganttConfig,
options.verbose,
options.width,
outputSuffix
]
var options = _options || {}
var outputDir = options.outputDir || process.cwd()
var outputSuffix = options.outputSuffix || ''
var next = _next || function () { }
var phantomArgs = [
phantomscript,
outputDir,
options.png,
options.svg,
options.css,
options.sequenceConfig,
options.ganttConfig,
options.verbose,
options.width,
outputSuffix
]
files.forEach(function (file) {
phantomArgs.push(file)
@@ -35,7 +35,7 @@ function processMermaid (files, _options, _next) {
if (err) {
throw err
}
phantom = spawn(options.phantomPath, phantomArgs)
var phantom = spawn(options.phantomPath, phantomArgs)
phantom.on('exit', next)