compiled version worky

This commit is contained in:
Radek Stepan 2012-05-22 12:38:47 +01:00
parent 45ca2e0a59
commit 8479b6557f

View File

@ -18,19 +18,11 @@ task "compile", "compile .coffee to .js", (options) ->
console.log "#{COLORS.BOLD}Compiling#{COLORS.DEFAULT}"
fs.readFile "paths.yml", "utf8", (err, data) ->
if err
console.log "#{COLORS.RED}#{err}#{COLORS.DEFAULT}" ; return
try
#paths = JSON.stringify yaml.load data
js = cs.compile fs.readFileSync('burndown.coffee', "utf-8"), bare: "on"
write 'js/burndown.js', "(function() {\n#{js}\n}).call(this);"
js = cs.compile fs.readFileSync('burndown.coffee', "utf-8"), bare: "on"
write 'js/burndown.js', "(function() {\n#{js}\n}).call(this);"
# We are done.
console.log "#{COLORS.GREEN}Done#{COLORS.DEFAULT}"
catch err
console.log "#{COLORS.RED}#{err}#{COLORS.DEFAULT}" ; return
# We are done.
console.log "#{COLORS.GREEN}Done#{COLORS.DEFAULT}"
# Append to existing file.
write = (path, text, mode = "w") ->