• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4608: Compress JS files for fast loading

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension BuildContrib Enhancement Closed   minor  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

JS files are normally quite nicely formatted. however this can make them slow to load. Indeed, TinyMCE depends on js being stripped for load.

The idea is to ship two versions of the JS in the release package. The first, named XYZ_src.js, is the nicely formatted source version you use during development.

The second, XYZ.js is automatically generated by the perl build.pl build target (automatically run during release builds).

The stripping can be done using the CPAN:JavaScript::Squish module

This is a requirement for packaging TinyMCE after patching. it is also potentially very useful for anyone else who uses JS.

-- TWiki:Main/CrawfordCurrie - 11 Sep 2007

At some time I have written something about naming convention for compressed files: TWiki:Codev/JavaScriptCodingStandards#Packaging_and_delivery

-- TWiki:Main.ArthurClemens - 11 Sep 2007

The naming convention comes from TinyMCE - i guess we can support more than one, though.

It also compresses .css using the same naming scheme (_srcs.css -> .css)

CC

ItemTemplate
Summary Compress JS files for fast loading
ReportedBy TWiki:Main.CrawfordCurrie
Codebase

SVN Range TWiki-4.2.0, Sat, 08 Sep 2007, build 14780
AppliesTo Extension
Component BuildContrib
Priority Enhancement
CurrentState Closed
WaitingFor

Checkins TWikirev:14823 TWikirev:14824 TWikirev:14825 TWikirev:14827 TWikirev:14828 TWikirev:14829 TWikirev:14834
TargetRelease minor
ReleasedIn

Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2008-01-31 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback