Skip to content

Commit

Permalink
clean up #314
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Nov 18, 2014
1 parent 87fac33 commit c95b417
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
11 changes: 5 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
Expand Up @@ -84,13 +84,13 @@ out in an HTML template.
callback or= (error) -> throw error if error
copyAsset = (file, callback) ->
if fs.existsSync file then fs.copy file, path.join(config.output, path.basename(file)), callback
else callback()
return callback() unless fs.existsSync file
fs.copy file, path.join(config.output, path.basename(file)), callback
complete = ->
copyAsset config.css, (error) ->
if error then callback error
else if fs.existsSync config.public then copyAsset config.public, callback
else callback()
return callback error if error
return copyAsset config.public, callback if fs.existsSync config.public
callback()
files = config.sources.slice()
Expand Down

0 comments on commit c95b417

Please sign in to comment.