summaryrefslogtreecommitdiff
path: root/gitweb/static/js/README
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2011-04-28 19:04:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-24 18:22:44 (GMT)
commit9a86dd571058a511e60af35206a31017d873e54a (patch)
treede61e11fe7e6fb237fa7687fd172c90ea70bb592 /gitweb/static/js/README
parentf09f1d35b5ea0637d8a3733cd246cb6bfb05b22a (diff)
downloadgit-9a86dd571058a511e60af35206a31017d873e54a.zip
git-9a86dd571058a511e60af35206a31017d873e54a.tar.gz
git-9a86dd571058a511e60af35206a31017d873e54a.tar.bz2
gitweb: Split JavaScript for maintability, combining on build
Split originally single gitweb.js file into smaller files, each dealing with single issue / area of responsibility. This move should make gitweb's JavaScript code easier to maintain. For better webapp performance it is recommended[1][2][3] to combine JavaScript files. Do it during build time (in gitweb/Makefile), by straight concatenation of files into gitweb.js file (which is now ignored as being generated). This means that there are no changes to gitweb script itself - it still uses gitweb.js or gitweb.min.js, but now generated. [1]: http://developer.yahoo.com/performance/rules.html "Minimize HTTP Requests" section [2]: http://code.google.com/speed/articles/include-scripts-properly.html "1. Combine external JavaScript files" [3]: http://javascript-reference.info/speed-up-your-javascript-load-time.htm "Combine Your Files" section. See also new gitweb/static/js/README file. Inspired-by-patch-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static/js/README')
-rw-r--r--gitweb/static/js/README20
1 files changed, 20 insertions, 0 deletions
diff --git a/gitweb/static/js/README b/gitweb/static/js/README
new file mode 100644
index 0000000..f8460ed
--- /dev/null
+++ b/gitweb/static/js/README
@@ -0,0 +1,20 @@
+GIT web interface (gitweb) - JavaScript
+=======================================
+
+This directory holds JavaScript code used by gitweb (GIT web interface).
+Scripts from there would be concatenated together in the order specified
+by gitweb/Makefile into gitweb/static/gitweb.js, during building of
+gitweb/gitweb.cgi (during gitweb building). The resulting file (or its
+minification) would then be installed / deployed together with gitweb.
+
+Scripts in 'lib/' subdirectory compose generic JavaScript library,
+providing features required by gitweb but in no way limited to gitweb
+only. In the future those scripts could be replaced by some JavaScript
+library / framework, like e.g. jQuery, YUI, Prototype, MooTools, Dojo,
+ExtJS, Script.aculo.us or SproutCore.
+
+All scripts that manipulate gitweb output should be put outside 'lib/',
+directly in this directory ('gitweb/static/js/'). Those scripts would
+have to be rewritten if gitweb moves to using some JavaScript library.
+
+See also comments in gitweb/Makefile.