RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

Allow inclusion of external file in output-wrapper #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is a feature request:

It would be wonderful, if it would be possible to do something like:

git rev-parse HEAD > version.txt
(writes commit id (like "319a30b7b9eafe2c671a2e7a9f48bbc54cb7baf6") into the 
file)

and then

java -jar plovr.jar build main.json > deploy/index.js

with following line in main.json:

"output-wrapper": "/* Copyright info */\nvar 
MY_PRODUCT_VERSION="%fromfile(version.txt)%";%output%",

This is not currently possible as far as I know and it might come very handy. 
Another possible usage is automatic inclusion of compiled styles into the 
javascript code thus creating applications completely contained in just one 
file.

Original issue reported on code.google.com by slouppetr on 27 Feb 2012 at 9:35

GoogleCodeExporter commented 8 years ago
I am going to mark this as WontFix and instead propose the following workaround:

Change your build process to generate a plovr config such that it includes the 
git commit hash in the "output-wrapper" option. This is actually not that 
difficult if you generate a plovr config that uses the "include" option to 
include your current config in addition to your generated "output-wrapper" 
value. Since you already require an extra step (git rev-parse HEAD > 
version.txt), this is not that much more work.

Original comment by bolinf...@gmail.com on 4 May 2012 at 9:03