Skip to content

expose #options attribute#26

Merged
jashkenas merged 1 commit intodocumentcloud:masterfrom
alunny:master
Jan 24, 2013
Merged

expose #options attribute#26
jashkenas merged 1 commit intodocumentcloud:masterfrom
alunny:master

Conversation

@alunny
Copy link
Copy Markdown
Contributor

@alunny alunny commented Jan 23, 2013

Motivation: when using Jammit with multiple packages, it is useful to vary options given to the jar based on an individual package.

For example, to generate source maps the closure compiler takes an option --create_source_map, with the path for the output source map. If I have 3 packages in my Jammit assets.yml, the last one to be packaged will overwrite the source map file (as the 2nd one will have already done to the 1st).

(actually getting Jammit to do this correctly will require some changes in that project; a pull request there is forthcoming)

This patch allows the options hash to be changed for each run, without creating a new Closure::Compiler object. Creating a new object is feasible too, although a bit less clean imo.

jashkenas added a commit that referenced this pull request Jan 24, 2013
expose #options attribute
@jashkenas jashkenas merged commit 0484508 into documentcloud:master Jan 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants