github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 2,010
    • 190
  • Source
  • Commits
  • Network (190)
  • Graphs
  • Tree: ccabf28

click here to add a description

click here to add a homepage

  • Switch Branches (3)
    • master
    • mobile
    • omgrequire
  • Switch Tags (41)
    • 1.4rc1
    • 1.4a2
    • 1.4a1
    • 1.4.2
    • 1.4.1
    • 1.4
    • 1.3rc1
    • 1.3b2
    • 1.3b1
    • 1.3.2
    • 1.3.1rc1
    • 1.3.1
    • 1.3
    • 1.2.6
    • 1.2.5
    • 1.2.4b
    • 1.2.4a
    • 1.2.4
    • 1.2.3b
    • 1.2.3a
    • 1.2.3
    • 1.2.2b2
    • 1.2.2b
    • 1.2.2
    • 1.2.1
    • 1.2
    • 1.1b
    • 1.1a
    • 1.1.4
    • 1.1.3a
    • 1.1.3.1
    • 1.1.3
    • 1.1.2
    • 1.1.1
    • 1.1
    • 1.0a
    • 1.0.4
    • 1.0.3
    • 1.0.2
    • 1.0.1
    • 1.0
  • Comments
Sending Request…

jQuery JavaScript Library — Read more

  Cancel

http://jquery.com/

  Cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Updated the documentation parser to work with categories. Additionally, I 
updated the copyright notice in the jQuery header and removed some 
extraneous whitespace from jQuery Lite.
jeresig (author)
Mon Aug 21 22:00:07 -0700 2006
commit  ccabf2823b528c09455432cafdb504c6a0216a18
tree    ea29f761f055d827f6c690000909c05db39a1f7a
parent  5ae02b2ecd6293ef33de3d3acf00c456ed01b776
M build/build/lite.js 2 ••
M build/docs/docs.js 31 ••••
M build/js/parse.js 28 •••••
M build/js/xml.js 2 ••
M src/jquery/jquery.js 3 •••
0
build/build/lite.js
...
1
2
3
4
 
5
6
...
1
2
3
 
4
5
6
0
@@ -1,6 +1,6 @@
0
 load("build/js/writeFile.js");
0
 
0
 var blockMatch = /\s*\/\*\*\s*((.|\n)*?)\s*\*\/\n*/g;
0
-var f = readFile(arguments[0]).replace( blockMatch, "\n" );
0
+var f = readFile(arguments[0]).replace( blockMatch, "\n" ).replace( /\n\n+/g, "\n\n" );
0
 
0
 writeFile( arguments[1], f );
0
build/docs/docs.js
...
1
2
 
 
3
4
 
5
6
7
 
 
8
9
 
 
10
11
 
 
12
13
14
 
 
 
 
 
 
15
16
17
18
19
 
 
 
 
 
...
1
2
3
4
5
 
6
7
 
 
8
9
10
 
11
12
13
 
14
15
16
 
 
17
18
19
20
21
22
23
 
 
 
 
24
25
26
27
28
0
@@ -1,19 +1,28 @@
0
 load("build/js/json.js", "build/js/xml.js", "build/js/writeFile.js", "build/js/parse.js");
0
 
0
+var dir = arguments[1];
0
+
0
 var c = parse( readFile(arguments[0]) );
0
-var json = Object.toJSON( c );
0
+output( c, "docs" );
0
 
0
-writeFile( arguments[1] + "/data/jquery-docs-json.js", json );
0
-writeFile( arguments[1] + "/data/jquery-docs-jsonp.js", "docsLoaded(" + json + ")" );
0
+c = categorize( c );
0
+output( c, "cat" );
0
 
0
-Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 };
0
+function output( c, n ) {
0
+  var json = Object.toJSON( c );
0
 
0
-var xml = Object.toXML( { method: c }, "docs" );
0
+  writeFile( dir + "/data/jquery-" + n + "-json.js", json );
0
+  writeFile( dir + "/data/jquery-" + n + "-jsonp.js", "docsLoaded(" + json + ")" );
0
 
0
-writeFile( arguments[1] + "/data/jquery-docs-xml.xml", 
0
-  "<?xml version='1.0' encoding='ISO-8859-1'?>\n" + xml );
0
+  Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 };
0
+  
0
+  var xml = Object.toXML( n == "docs" ? { method: c } : c, "docs" );
0
+  
0
+  writeFile( dir + "/data/jquery-" + n + "-xml.xml", 
0
+    "<?xml version='1.0' encoding='ISO-8859-1'?>\n" + xml );
0
 
0
-writeFile( arguments[1] + "/index.xml",
0
-  "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
0
-  "<?xml-stylesheet type='text/xsl' href='style/docs.xsl'?>\n" + xml
0
-);
0
+  writeFile( dir + "/" + ( n == "docs" ? "index" : n ) + ".xml",
0
+    "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
0
+    "<?xml-stylesheet type='text/xsl' href='style/docs.xsl'?>\n" + xml
0
+  );
0
+}
0
build/js/parse.js
...
67
68
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
0
@@ -67,3 +67,31 @@ function parse( f ) {
0
 
0
   return c;
0
 }
0
+
0
+function categorize( json ) {
0
+  var obj = { methods: [] };
0
+
0
+  for ( var i = 0; i < json.length; i++ ) {
0
+    if ( !json[i].cat ) json[i].cat = "";
0
+
0
+    var cat = json[i].cat.split("/");
0
+
0
+    var pos = obj;
0
+    for ( var j = 0; j < cat.length; j++ ) {
0
+      var c = cat[j];
0
+
0
+      // Create current category
0
+      if ( !pos[c] ) pos[c] = { methods: [] };
0
+
0
+      // If we're at  the end, add the method
0
+      if ( j == cat.length - 1 )
0
+        pos[c].methods.push( json[i] );
0
+
0
+      // Otherwise, traverse deeper
0
+      else
0
+        pos = pos[c];
0
+    }
0
+  }
0
+
0
+  return obj;
0
+}
0
build/js/xml.js
...
9
10
11
12
 
13
14
15
...
9
10
11
 
12
13
14
15
0
@@ -9,7 +9,7 @@ Object.toXML = function( obj, tag ) {
0
     var p = "", child = "";
0
 
0
     for ( var i in obj )
0
-      if ( obj[i].constructor == Array || /</.test(obj[i] + "") || Object.toXML.force[i] )
0
+      if ( obj[i].constructor != String || /</.test(obj[i] + "") || Object.toXML.force[i] )
0
         child += Object.toXML( obj[i], i );
0
       else
0
         p += " " + i + "='" + (obj[i] + "").replace(/'/g, "&apos;") + "'";
0
src/jquery/jquery.js
...
2
3
4
5
 
 
6
7
8
...
2
3
4
 
5
6
7
8
9
0
@@ -2,7 +2,8 @@
0
  * jQuery - New Wave Javascript
0
  *
0
  * Copyright (c) 2006 John Resig (jquery.com)
0
- * Dual licensed under the MIT and GPL licenses.
0
+ * Dual licensed under the MIT (MIT-LICENSE.txt) 
0
+ * and GPL (GPL-LICENSE.txt) licenses.
0
  *
0
  * $Date$
0
  * $Rev$

Comments

Please log in to comment.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server