commit 2a9727fa15ef3ab823d9b4daad4395c0bc6c0840 Author: Tom Hughes 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 c9dea72..8a85770 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, '../node_modules/google-closure-compiler/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) -> @@ -67,7 +59,7 @@ exports.compile = (input, options, callback) -> if value != true args.push value - compiler = spawn JAVA_PATH, args + compiler = spawn 'closure-compiler', args stdout = '' stderr = ''