Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
Added doc:readme Cake task.
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Dec 14, 2010
1 parent 0b1a192 commit 406ed04
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Cakefile
Expand Up @@ -13,9 +13,21 @@ log = (message, color, explanation) ->
console.log color + message + reset + ' ' + (explanation or '')

task "doc:source", "Builds source documentation", ->
exec "docco lib/**/*.coffee && rm -rf html && cp -r docs html && rm -rf docs", (err) ->
log "Documenting source files", green
exec "docco lib/**/*.coffee && mv -f docs/* html/ && rm -rf docs", (err) ->
throw err if err

task "doc:readme", "Build README file", ->
markdown = require("node-markdown").Markdown
fs.mkdir "html", 0777, ->
fs.readFile "README.md", "utf8", (err, text)->
log "Writing html/index.html", green
fs.writeFile "html/index.html", markdown(text), "utf8"

task "doc", "Generate documentation", ->
invoke "doc:readme"
invoke "doc:source"

task "test", "Run all tests", -> exec "vows"

task "clean", "Remove temporary files and such", ->
Expand Down

0 comments on commit 406ed04

Please sign in to comment.