twilson63/cakefile-template — pull request #1 by zeke (2012-03-01 22:19:35+00:00)
Title: Updated README

Using the current version of get-post to fetch the Cakefile gives a result full of newlines. I think it's because get-post is expecting JSON...

"fs = require 'fs'\n{print} = require 'util'\n{spawn, exec} = require 'child_process'\n\n# ANSI Terminal Colors\nbold = '\\033[0;1m'\ngreen = '\\033[0;32m'\nreset = '\\033[0m'\nred = '\\033[0;31m'\n\nlog = (message, color, explanation) ->\n console.log color + message + reset + ' ' + (explanation or '')\n\nbuild = (watch, callback) ->\n if typeof watch is 'function'\n callback = watch\n watch = false\n options = ['-c', '-o', 'lib', 'src']\n options.unshift '-w' if watch\n\n coffee = spawn 'coffee', options\n coffee.stdout.on 'data', (data) -> print data.toString()\n coffee.stderr.on 'data', (data) -> log data.toString(), red\n coffee.on 'exit', (status) -> callback?() if status is 0\n\nspec = (callback) ->\n options = ['spec', '--coffee']\n spec = spawn 'jasmine-node', options\n spec.stdout.on 'data', (data) -> print data.toString()\n spec.stderr.on 'data', (data) -> log data.toString(), red\n spec.on 'exit', (status) -> callback?() if status is 0\n\n\ntask 'docs', 'Generate annotated source code with Docco', ->\n fs.readdir 'src', (err, contents) ->\n files = (\"src/#{file}\" for file in contents when /\\.coffee$/.test file)\n docco = spawn 'docco', files\n docco.stdout.on 'data', (data) -> print data.toString()\n docco.stderr.on 'data', (data) -> log data.toString(), red\n docco.on 'exit', (status) -> callback?() if status is 0\n\n\ntask 'build', ->\n build -> log \":)\", green\n\ntask 'spec', 'Run Jasmine-Node', ->\n build -> spec -> log \":)\", green\n"