 path = require 'path'
 [mkdirp, coffee, uglify] = []
 
-class StylusAutocompile
+class CoffeeAutocompile
   activate: ->
     @disposable = atom.commands.add 'atom-workspace', 'core:save', @handleSave
 

    renderer = coffee.compile source,
      sourceMap: params.sourcemap

    filePath = path.resolve path.dirname(params.file), params.out
    if params.sourcemap
      {js, v3SourceMap} = renderer
      js += "\n//# sourceMappingURL=#{filePath}.map"


    @writeFile filePath, js
    @writeFile "#{filePath}.map", v3SourceMap if v3SourceMap

  writeFile: (filePath, content) ->
    mkdirp ?= require 'mkdirp'
