mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 17:54:13 +01:00
Adds CSS option to the CLI
This commit is contained in:
@@ -29,13 +29,14 @@ var system = require('system')
|
||||
, webpage = require('webpage')
|
||||
|
||||
var page = webpage.create()
|
||||
, files = phantom.args.slice(5, phantom.args.length)
|
||||
, files = phantom.args.slice(6, phantom.args.length)
|
||||
, options = {
|
||||
outputDir: phantom.args[0]
|
||||
, png: phantom.args[1] === 'true' ? true : false
|
||||
, svg: phantom.args[2] === 'true' ? true : false
|
||||
, sequenceConfig: phantom.args[3]
|
||||
, verbose: phantom.args[4] === 'true' ? true : false
|
||||
, css: phantom.args[3] !== '' ? phantom.args[3] : '* { margin: 0; padding: 0; }'
|
||||
, sequenceConfig: phantom.args[4]
|
||||
, verbose: phantom.args[5] === 'true' ? true : false
|
||||
}
|
||||
, log = logger(options.verbose)
|
||||
|
||||
@@ -43,7 +44,7 @@ page.content = [
|
||||
'<html>'
|
||||
, '<head>'
|
||||
, '<style type="text/css">'
|
||||
, '* { margin: 0; padding: 0; }'
|
||||
, options.css
|
||||
, '</style>'
|
||||
, '</head>'
|
||||
, '<body>'
|
||||
|
||||
Reference in New Issue
Block a user