diff --git a/bin/index.js b/bin/index.js index aeda78e..953e2fa 100755 --- a/bin/index.js +++ b/bin/index.js @@ -53,6 +53,7 @@ const cli = meow( style: { type: 'string', shortFlag: 's', + isMultiple: true, }, header: { type: 'string', @@ -100,6 +101,7 @@ const destination = cli.input[1] || source.slice(0, source.indexOf('.md')) + '.pdf'; const debug = cli.flags.debug || false; let style = cli.flags.style; +let style_files = style.map(function(s) { return resolve(s); }); const header = cli.flags.header; const headerHeight = cli.flags.hHeight; const footer = cli.flags.footer; @@ -130,7 +132,7 @@ const options = { defaultStyle: true, source: resolve(source), destination: resolve(destination), - styles: style ? resolve(style) : null, + styles: style ? style_files : null, header: header ? resolve(header) : null, footer: footer ? resolve(footer) : null, noEmoji: cli.flags.noEmoji || false, diff --git a/src/index.js b/src/index.js index 7a89867..de3cd17 100644 --- a/src/index.js +++ b/src/index.js @@ -30,7 +30,7 @@ const headerLayoutPath = join(__dirname, '/layouts/header.hbs'); const footerLayoutPath = join(__dirname, '/layouts/footer.hbs'); function getAllStyles(options) { - const cssStyleSheets = []; + let cssStyleSheets = []; // GitHub Markdown Style if (options.ghStyle) { @@ -46,7 +46,7 @@ function getAllStyles(options) { // Optional user given CSS if (options.styles) { - cssStyleSheets.push(options.styles); + cssStyleSheets = cssStyleSheets.concat(options.styles); } return {