Skip to content

Commit

Permalink
Fix CLI css, template, and marked options not honored.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leftium committed Dec 8, 2022
1 parent dcaae36 commit 384aeae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions docco.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions docco.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 384aeae

Please sign in to comment.