         fs.unlink c for c in compiled
     true
 
-   compile: (files, target, cb)->
-     coffee = path.join(require.resolve('coffee-script'), '../../../bin/coffee')
-     argv = ['--compile', '--output', target].concat files
-     jake.mkdirP target
-     p = spawn coffee, argv
-     p.stdout.on 'data', (data)-> process.stdout.write data
-     p.stderr.on 'data', (data)-> process.stderr.write data
-     p.on 'exit', (status)->
-       fail "Compilation failed with status #{status}" unless status == 0
-       cb()
+   compile: (source, target, cb)->
+     jake.mkdirP path.dirname(target)
+     c = fs.readFileSync source, 'utf-8'
+     j = coffee.compile c
+     fs.writeFileSync target, j, 'utf-8'
+     cb()
 
    invokeTask: ->
      jake.Task[@options.name].invoke()

require 'colors'
fs    = require 'fs'
path  = require 'path'
spawn = require('child_process').spawn

Tintan = null


  DEFAULT_OPTIONS =
    src: 'src/coffee'        # directory to take .coffee files from
    target: 'Resources'      # directory to put .js files into
    name: 'compile:coffee'   # name of the compiler task to generate


