documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.io/jammit/
MIT License
1.16k stars 197 forks source link

Unclear how to use the compressor_options for Google Closure #235

Open chris-rock opened 12 years ago

chris-rock commented 12 years ago

Following https://developers.google.com/closure/compiler/docs/api-tutorial3#howto-app and https://github.com/documentcloud/closure-compiler it should be easy to use something like:

javascript_compressor: closure
#compressor_options:
#  compilation_level: "ADVANCED_OPTIMIZATIONS"
#  externs: src/js/externs.js

Looks like the externs parameter is not recognized

knowtheory commented 12 years ago

Hey @chris-rock have you checked out the usage instructions on how to use the advanced optimizations in your own compilation scripts? https://github.com/documentcloud/closure-compiler#usage

Ah looks like you have. Pull requests always welcome :)

daaain commented 11 years ago

I'm not sure how could this work without custom parsing in Jammit. You can pass multiple externs parameters to Closure compiler on the CLI, but will that work in YAML?

For example:

javascript_compressor: closure
compressor_options:
  compilation_level: "ADVANCED_OPTIMIZATIONS"
  externs: src/js/jquery.js
  externs: src/js/my_externs.js