Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (23 sloc) 942 Bytes
{spawn, exec} = require 'child_process'
option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`'
task 'build', 'continually build the docco library with --watch', ->
coffee = spawn 'coffee', ['-cw', '-o', 'lib', 'src']
coffee.stdout.on 'data', (data) -> console.log data.toString().trim()
task 'install', 'install the `docco` command into /usr/local (or --prefix)', (options) ->
base = options.prefix or '/usr/local'
lib = base + '/lib/docco'
'mkdir -p ' + lib
'cp -rf bin README resources vendor lib ' + lib
'ln -sf ' + lib + '/bin/docco ' + base + '/bin/docco'
].join(' && '), (err, stdout, stderr) ->
if err then console.error stderr
task 'doc', 'rebuild the Docco documentation', ->
'bin/docco src/'
'sed "s/docco.css/resources\\/docco.css/" < docs/docco.html > index.html'
'rm -r docs'
].join(' && '), (err) ->
throw err if err
Something went wrong with that request. Please try again.