Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CLI css, template, and marked options not honored. #425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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