From 099f366f59f474b0b431487b57844e5a61f9b110 Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Sun, 13 Nov 2022 02:00:06 +0100 Subject: [PATCH] Adjust the configure function to commander v8 As of commander v8, the options are no longer present on commander itself; they are only available through commander.opts(). --- docco.litcoffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docco.litcoffee b/docco.litcoffee index 7c43a8d4..5d3331fe 100644 --- a/docco.litcoffee +++ b/docco.litcoffee @@ -253,19 +253,19 @@ In this case, it is also neccessary to explicitly specify a stylesheet file. These custom templates are compiled exactly like the predefined ones, but the `public` folder is only copied for the latter. - if options.template - unless options.css + if config.template + unless config.css console.warn "docco: no stylesheet file specified" config.layout = null else dir = config.layout = path.join __dirname, 'resources', config.layout config.public = path.join dir, 'public' if fs.existsSync path.join dir, 'public' config.template = path.join dir, 'docco.jst' - config.css = options.css or path.join dir, 'docco.css' + config.css = config.css or path.join dir, 'docco.css' config.template = _.template fs.readFileSync(config.template).toString() - if options.marked - config.marked = JSON.parse fs.readFileSync(options.marked) + if config.marked + config.marked = JSON.parse fs.readFileSync(config.marked) config.sources = options.args.filter((source) -> lang = getLanguage source, config