From 189325508e996452a9da546a6fc55e5b4ecb5c90 Mon Sep 17 00:00:00 2001 From: knsv Date: Wed, 16 Sep 2015 07:30:25 +0200 Subject: [PATCH] Usage of path.join for adding styles as per suggestions from @fardog --- lib/cli.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cli.js b/lib/cli.js index d899ee039..80dee52ca 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -4,6 +4,7 @@ var fs = require('fs') , which = require('which') , parseArgs = require('minimist') , semver = require('semver') + , path = require('path') var PHANTOM_VERSION = "^1.9.0" @@ -110,7 +111,7 @@ cli.prototype.parse = function(argv, next) { this.errors.push(err) } } else { - options.css = fs.readFileSync(__dirname + '/../dist/mermaid.css') + options.css = fs.readFileSync(path.join(__dirname, '..', 'dist', 'mermaid.css')) } this.checkPhantom = createCheckPhantom(options.phantomPath)