Blob Blame History Raw
commit 5e1d811170f997cd93d58f34fa0d0f6e51681bbc
Author: Tom Hughes <tom@compton.nu>
Date:   Thu Apr 24 00:18:35 2014 +0100

    Use closure-compiler wrapper script to get correct class path

diff --git a/src/index.coffee b/src/index.coffee
index cf8e0d3..d80d42b 100644
--- a/src/index.coffee
+++ b/src/index.coffee
@@ -22,10 +22,7 @@
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 spawn = require('child_process').spawn
-path  = require 'path'
 
-JAVA_PATH = exports.JAVA_PATH = 'java'
-JAR_PATH  = exports.JAR_PATH  = path.join __dirname, 'vendor/compiler.jar'
 OPTIONS   = exports.OPTIONS   = {}
 
 exports.compile = (input, options, callback) ->
@@ -42,11 +39,6 @@ exports.compile = (input, options, callback) ->
 
   args = []
 
-  if !options.jar
-    options.jar = JAR_PATH
-
-  args.push('-jar')
-  args.push(options.jar)
   delete options.jar
 
   Object.keys(options).forEach (key) ->
@@ -61,7 +53,7 @@ exports.compile = (input, options, callback) ->
     args.push "--#{key}"
     args.push value
 
-  compiler = spawn JAVA_PATH, args
+  compiler = spawn 'closure-compiler', args
   stdout   = ''
   stderr   = ''