You are here: Foswiki>Tasks Web>Item9954 (09 Mar 2011, GeorgeClark)Edit Attach

Item9954: Add minifiers to MANIFEST

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.2
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: IngoKappler
Waiting For:
Last Change By: GeorgeClark
Make minifiers officially part of a Foswiki release based on this discussion:

<CDot>   IngoK is asking why we release the JS minifier tools in the standard release
<Babar>   CDot: that's for JQuery iirc
<Babar>   MichaelDaum wanted them :)
<CDot>   are they part of the JQueryPlugin? If not, why do we release them?
<pharvey>   CDot: probably a MANIFEST oversight?
<Babar>   yes, they are part of the JQueryPlugin
* Babar   remembers asking MD about it, and he said it's needed for some stuff
<CDot>   I'm suspecting a MANIFEST oversight. MichaelDaum: can you comment?
<Babar>   like JQuery's internal compression mechanism, or some caching, or God knows what.
<EugenMayer>   pharvey: Babar: so Shibboleth would work OOTB with a DC 2k3 (< r1) ?
<Babar>   not out of the box, but if you configure it, yes, it should
<MichaelDaum>   CDot, on what?
<CDot>   MichaelDaum: 13:28:08) CDot: IngoK is asking why we release the JS minifier tools in the standard release
(13:29:04) ***Babar remembers asking MD about it, and he said it's needed for some stuff
* pharvey   doesn't really know, haven't done it before, but I have a colleague that does :)
<Babar>   s/that/who/
<MichaelDaum>   we ship 4 minifiers
two perlbased and two java based
the later of which do best compression
for css and for js
<CDot>   MichaelDaum: why?
<MichaelDaum>   every css and js shall be minified
<CDot>   why do we ship a minifier?
<EugenMayer>   it would have been great using PAM (mod_auth_pam), but well its not working with negotiation
<MichaelDaum>   people might tinker with css and want to minify again
<CDot>   MichaelDaum: they might, but the minifiers are hidden away, and the chances of anyone finding them and reverse-engineering how to use them......
<Babar>   oh right... that was part of the plan... have configure check dates for compress / generated / minified files, and re-generate them on-the-fly
<CDot>   unless , of course, you have written instructiobs?
<EugenMayer>   CDot: MichaelDaum: it does make sense to ship minifier tools, esp. if you use them in Foswiki to automatically minify JS / CSS files into one file and cache this file
<CDot>   EugenMayer: we don't. That's why I'm asking.
<MichaelDaum>   CDot, they arent. minifying goes like edit css - save - type make... all done
<CDot>   I'm fine with shipping them, i just want to (1) understand the rationale and (2) make sure instructions exist
<MichaelDaum>   we even ship a jslint tool
<CDot>   MichaelDaum: BuildContrib handles minifying for you.
<MichaelDaum>   make does better ... WAY faster
<CDot>   we do not release make, or recommend it in any part of the toolset
<MichaelDaum>   CDot, your anal day today?
<CDot>   no. i just don't like bloating the release package with unusable tools.
<MichaelDaum>   and I don't like block heads
<CDot>   comeing from a squarehead, that's rich
=-=   MichaelDaum is now known as MichaelDaum_
<CDot>   ok, so, we know where they come from, and why. IngoK, I'd recommend raising a task and fixing that other issue you mentioned.
<IngoK>   ok
-- IngoKappler - 04 Nov 2010

Had a short discussion with Michael about the actual permissions. I was looking to use 0444 for readable and 0555 for executable files while normally the default for any other files seems to be 0755 for executable and 0655 for readable. Files in tools and bin directories look "normally" to be not writable, especially when also being executable. Just stating this here, so it is known why the change came up although in fact the files were alreaday in the MANIFEST of the JQueryPlugin.

-- IngoKappler - 04 Nov 2010

This changes the release so it goes to WaitingForRelease to be included in the release notes

But where is the documentation for using these new tools.

If there is no documentation then they are useless. And then I am 100% with Crawford. We need a little more customer focus in our decisions and actions.

I am re-opening this. And unless I see some documentation I will remove this again.

-- KennethLavrsen - 04 Nov 2010

We are dealing with tons of js and css in foswiki now. That's why I think we should ship those 4 or 5 files as customers had to get them manually from elsewhere for normal code maintenance and compression tasks. They are already used by other non-standard plugins. Most probably they should be moved from JQueryPlugin to BuildContrib. So customers can chose to install them if they want.

-- MichaelDaum - 04 Nov 2010

I fully understand that some customers who are not programmers may want to modifiy especially the CSS files and as part of skin tailoring and then wanting to create compressed versions.

The trouble is throwing in several executable in the tools directory without a hint of documentation.

Please - if you want them included - make sure to add the approx 2-3 lines of documentation per file that is needed for someone to get an idea how to use them.

I assume one of the System topics that describe skin mods is the right place. It will take you 10 minutes to do. That is also what Crawford said above.

This is not about if the tools are in or out. It is about documenting them.

I am not talking about a full geek docu. Just a simple reference and usage description that explains how you use them the for specific purpose in Foswiki context.

Please spend the 10 minutes. I would do it if I knew how to use them. I could spend 4 hours finding out. But it is more reasonable that the person that already knows spends 10 minutes. It is 2-3 lines per tool in one of the existing System web topics we are talking about.

-- KennethLavrsen - 04 Nov 2010

Have a try yourself? Should be a lot shorter than all of this bug report and emails.

-- MichaelDaum - 05 Nov 2010

I don't know how to use these tools. But I know how to remove 4 lines from a manifest

-- KennethLavrsen - 06 Nov 2010

Not that I need these tools yet but..., here follow some digged results for documentation.

minifyjs is a perl script which depends on the Perl module JavaScript::Minifier available via CPAN, which obviously must be installed before minifyjs can be used at all. This data plus maybe a few more surrounding words might be sufficient to initially document this sole file.

minifycss is a perl script which depends on the Perl module CSS::Minifier available via CPAN, which obviously must be installed before minifycss can be used at all. This data plus maybe a few more surrounding words might be sufficient to initially document this sole file.

jslint4java.jar provides a simple interface for detecting potential problems in JavaScript code and has its home here. To use the jar obviously java needs to be available, which for Foswiki normally isn't required. To get started the following command will make the help available:
java -jar jslint4java-1.4.4.jar --help
Knowning this and a link to the homepage should be good enough to get someone started with it.

yuicompressor.jar has its home here and an installed java must be available to use it. The following command leads to the help:
java -jar yuicompressor.jar --help
Knowning this and a link to the homepage should be good enough to get someone started with it.

So it remains the question where to place such initial documentation, any more specific suggestions than what Kenneth already mentioned above (System topics that describe skin mods)?

-- IngoKappler - 09 Nov 2010
 
Topic revision: r15 - 09 Mar 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy