cjohansen / juicer

A command line tool for JavaScript and CSS developers
630 stars 47 forks source link

Reflect minification result using the exit code #69

Open garside opened 11 years ago

garside commented 11 years ago

When the underlying minifier runs, it "silently fails" as Juicer returns with a 0 exit code regardless of the status of the underlying minifier.

If the tool could bubble up any underlying compiler exceptions through a non-zero exit code, these sort of compiler failures can be programmatically detected and dealt with.

Example:

~/ $ juicer merge lib/jquery/jquery/jquery.js --skip-verification [ERROR] 4051:32:missing name after . operator

... snip ...

[ERROR] 1:0:Compilation produced 30 syntax errors. org.mozilla.javascript.EvaluatorException: Compilation produced 30 syntax errors. ... snip ... at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21) Produced lib/jquery/jquery/jquery.min.js from lib/jquery/jquery/jquery.js

~/ $ echo $? 0