Skip to content

Commit

Permalink
fixed bug where an error would be thrown when copying files
Browse files Browse the repository at this point in the history
  • Loading branch information
neocotic committed Mar 29, 2013
1 parent c3fa22d commit 41d474d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions docco.js

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

6 changes: 4 additions & 2 deletions docco.litcoffee
Expand Up @@ -83,10 +83,12 @@ out in an HTML template.
fs.mkdirs config.output, ->
callback or= (error) -> throw error if error
copyAsset = (file, callback) ->
fs.copy file, path.join(config.output, path.basename(file)), callback
complete = ->
fs.copy config.css, config.output, (error) ->
copyAsset config.css, (error) ->
if error then callback error
else if fs.existsSync config.public then fs.copy config.public, config.output, callback
else if fs.existsSync config.public then copyAsset config.public, callback
else callback()
files = config.sources.slice()
Expand Down

0 comments on commit 41d474d

Please sign in to comment.