Permalink
Browse files

fixed bug where an error would be thrown when copying files

  • Loading branch information...
1 parent c3fa22d commit 41d474d94734e52f34de2786e802ae3dbf701260 @neocotic neocotic committed Mar 29, 2013
Showing with 10 additions and 5 deletions.
  1. +6 −3 docco.js
  2. +4 −2 docco.litcoffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -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()

0 comments on commit 41d474d

Please sign in to comment.