Support input source map
authorMihai Bazon <mihai@bazon.net>
Mon, 24 Sep 2012 14:02:18 +0000 (17:02 +0300)
committerMihai Bazon <mihai@bazon.net>
Mon, 24 Sep 2012 14:02:18 +0000 (17:02 +0300)
commit42038fd67f49be16a01be8a7f8085d9a52f13c50
treee620c06950ec351c3b135eda249b4165aa4ff589
parent4f97da96608744e9f20c3994d8d1e66d6b6949a1
Support input source map

This is useful while compressing generated code; for example compressing JS
compiled by CoffeeScript (assuming you got a source map):

    uglifyjs2 --in-source-map generated.js.map \
              --source-map uglified.js.map \
              -o uglified.js

The above assumes you have a "generated.js.map" file which is the source
mapping between your CoffeeScript and the generated.js (compiled output from
CoffeeScript).  The name of the input file is not present in this example;
it will be fetched from the source map (but it can be passed manually too).

The output will be in "uglified.js" and the output map "uglified.js.map"
will actually map to the original CoffeeScript code, rather than to
generated.js.
bin/uglifyjs2
lib/output.js
lib/sourcemap.js