Sha256: 9e2689bac940e037a794bba0218a91ac1780926a38a8b723b3f6346d45c80008
Contents?: true
Size: 414 Bytes
Versions: 5
Compression:
Stored size: 414 Bytes
Contents
module PreCommit class ClosureCheck CLOSURE_PATH = File.expand_path("../../support/closure/compiler.jar", __FILE__) def self.call(staged_files) return if staged_files.empty? js_args = staged_files.map {|arg| "--js #{arg}"}.join(' ') errors = `java -jar #{CLOSURE_PATH} #{js_args} --js_output_file /tmp/jammit.js 2>&1`.strip return if errors.empty? errors end end end
Version data entries
5 entries across 5 versions & 1 rubygems