Skip to content

Commit

Permalink
Added a command to rebuild documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvande committed Dec 31, 2010
1 parent a89ad75 commit ea145ff
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Cakefile
Expand Up @@ -5,14 +5,23 @@ CoffeeScript = require 'coffee-script'

option '-o', '--output [DIR]', 'directory for compiled code'

task 'build:js', 'Builds Milk into ./pages (or --output)', (options) ->
out = options.output or 'pages'
out = path.join(__dirname, out) unless out[0] = '/'
task 'build:js', 'Builds Milk into ./pages (or --output)', (opts) ->
out = opts.output or 'pages'
out = path.join(__dirname, out) unless out[0] = '/'

fs.readFile path.join(__dirname, 'milk.coffee'), 'utf8', (err, data) ->
throw err if err
fs.writeFile path.join(out, 'milk.js'), CoffeeScript.compile(data)

task 'build:docs', 'Builds documentation with Docco', (opts) ->
chain = (commands...) ->
exec commands.shift(), (err) ->
throw err if err
chain commands... if commands.length
chain 'docco milk.coffee',
'mv docs/milk.html pages/index.html',
'rm -r docs',

task 'spec:node', 'Creates compliance tests for the Mustache spec in Vows', ->
readSpecs (file, json) ->
test = """
Expand Down

0 comments on commit ea145ff

Please sign in to comment.