Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

replaced mkdirp and wrench with fs.extra

  • Loading branch information...
commit daae6236812c22f45a6fb3441861aa2a316364ff 1 parent c956e41
@neocotic neocotic authored
Showing with 16 additions and 17 deletions.
  1. +15 −15 docco.litcoffee
  2. +1 −2  package.json
View
30 docco.litcoffee
@@ -80,14 +80,16 @@ out in an HTML template.
document = (options = {}, callback) ->
configure options
- mkdirp config.output, ->
+ fs.mkdirp config.output, ->
callback or= (error) -> throw error if error
complete = ->
- exec [
- "cp -f #{config.css} #{config.output}"
- "cp -fR #{config.public} #{config.output}" if fs.existsSync config.public
- ].join(' && '), callback
+ async.parallel [
+ (done) -> fs.copy config.css, config.output, done
+ , (done) ->
+ if fs.existsSync config.public then fs.copyRecursive config.public, config.output, done
+ else done()
+ ], callback
files = config.sources.slice()
@@ -223,16 +225,14 @@ Helpers & Initial Setup
Require our external dependencies.
- _ = require 'underscore'
- fs = require 'fs'
- path = require 'path'
- async = require 'async'
- marked = require 'marked'
- mkdirp = require 'mkdirp'
- commander = require 'commander'
- {highlight} = require 'highlight.js'
- {spawn, exec} = require 'child_process'
- {copyDirRecursive} = require 'wrench'
+ _ = require 'underscore'
+ fs = require 'fs.extra'
+ path = require 'path'
+ async = require 'async'
+ marked = require 'marked'
+ commander = require 'commander'
+ {highlight} = require 'highlight.js'
+ {spawn, exec} = require 'child_process'
Languages are stored in JSON in the file `resources/languages.json`.
Each item maps the file extension to the name of the language and the
View
3  package.json
@@ -15,9 +15,8 @@
"async": ">= 0.2.6",
"commander": ">= 0.5.2",
"marked": ">= 0.2.7",
- "mkdirp": ">= 0.3.5",
+ "fs.extra": ">= 1.2.0",
"underscore": ">= 1.0.0",
- "wrench": ">= 1.4.4",
"highlight.js": ">= 7.3.0"
},
"main" : "./docco",
Please sign in to comment.
Something went wrong with that request. Please try again.