Merge pull request #205 from gillesdemey/dev-default-style

Default style when using the CLI
This commit is contained in:
Knut Sveidqvist
2015-09-16 07:23:39 +02:00
3 changed files with 14 additions and 1 deletions

2
dist/mermaid.css vendored
View File

@@ -256,5 +256,5 @@ text {
} }
.mermaid { .mermaid {
width:1200px; width: auto;
} }

View File

@@ -109,6 +109,8 @@ cli.prototype.parse = function(argv, next) {
} catch (err) { } catch (err) {
this.errors.push(err) this.errors.push(err)
} }
} else {
options.css = fs.readFileSync(__dirname + '/../dist/mermaid.css')
} }
this.checkPhantom = createCheckPhantom(options.phantomPath) this.checkPhantom = createCheckPhantom(options.phantomPath)

View File

@@ -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) { test('setting a css source file succeeds', function(t) {
t.plan(1) t.plan(1)