#13290 closed (fixed)
dependency on external jar file for admin js minification needs better documentation
Reported by: | Gabriel Hurley | Owned by: | Gabriel Hurley |
---|---|---|---|
Component: | Documentation | Version: | 1.1 |
Severity: | Keywords: | admin js compress | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In revision [12371] jezdez added contrib/admin/media/js/compress.py
, which is very handy but is also dependent on the developer having downloaded and installed Google's Closure Compiler. That's further complicated by the fact that Closure Compiler relies on Java 6 (or Java 1.6 on Mac OS X, which was not the default shipped version of Java until Snow Leopard).
While I eventually figured out what compiler it was looking for from the help text on the -c
flag ( "path to closure compiler jar file"), having proper documentation of the external requirement, where to download the compiler from, a note about the potential trouble with Mac OS X, etc. would be more developer-friendly. Comments in the source and/or improved help text are probably the place to add the notes.
I'll write up a patch a bit later.
Attachments (1)
Change History (6)
comment:1 by , 15 years ago
Component: | Contrib apps → Documentation |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
You got me, this needs documentation in the contribution docs. But FWIW, I don't think minification (Russ' bullet point 1) should be a required step for contributed admin JavaScript fixes. We always compile translation files before committing them, too.
by , 15 years ago
Attachment: | 13290_js_compression_docs.diff added |
---|
adds info on minifying admin javascript and compress.py
comment:3 by , 15 years ago
Has patch: | set |
---|---|
Status: | new → assigned |
I've attached a patch as per Russ's earlier direction. It was written before I saw jezdez's comment.
For what it's worth, IMHO it's better to:
- "require" people to include the minified version in their patch, knowing that they're human and it'll often be necessary to minify them again before committing, rather than
- not require people to include it and have them almost never submit a minified version in the patch.
Also, another question as long as we're talking about it: should the other admin javascript files eventually be transitioned to using compressed versions as well? Currently compress.py only hits 3 files even though it says it compresses "all" of them.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This needs to be documented in two ways:
I suspect both of these should be additions to the contributing docs, similar to the way that the process for submitting translation updates is documented.