diff --git a/dist/mermaid.css b/dist/mermaid.css index f997400f70..ad2674b4a8 100644 --- a/dist/mermaid.css +++ b/dist/mermaid.css @@ -256,5 +256,5 @@ text { } .mermaid { - width:1200px; + width: auto; } diff --git a/lib/cli.js b/lib/cli.js index e2506e4bda..d899ee039e 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -109,6 +109,8 @@ cli.prototype.parse = function(argv, next) { } catch (err) { this.errors.push(err) } + } else { + options.css = fs.readFileSync(__dirname + '/../dist/mermaid.css') } this.checkPhantom = createCheckPhantom(options.phantomPath) diff --git a/test/cli_test-parser.js b/test/cli_test-parser.js index be03bebe1d..ab913478f5 100644 --- a/test/cli_test-parser.js +++ b/test/cli_test-parser.js @@ -71,6 +71,17 @@ test('setting an output directory succeeds', function(t) { }) }) +test('not setting a css source file uses a default style', function(t) { + t.plan(1) + + var cli = require(cliPath) + + cli.parse([], function(err, msg, opt) { + t.ok(opt.css, 'css file is populated') + t.end() + }) +}) + test('setting a css source file succeeds', function(t) { t.plan(1)