2006-08-14 03:46:05 +02:00
|
|
|
load("build/js/json.js", "build/js/xml.js", "build/js/writeFile.js", "build/js/parse.js");
|
2006-08-13 17:15:15 +02:00
|
|
|
|
2006-08-22 07:00:07 +02:00
|
|
|
var dir = arguments[1];
|
|
|
|
|
2006-10-08 11:57:17 +02:00
|
|
|
var c = parse( read(arguments[0]) );
|
2006-08-22 07:00:07 +02:00
|
|
|
output( c, "docs" );
|
2006-08-13 17:15:15 +02:00
|
|
|
|
2006-08-22 07:00:07 +02:00
|
|
|
c = categorize( c );
|
|
|
|
output( c, "cat" );
|
2006-08-13 17:15:15 +02:00
|
|
|
|
2006-08-22 07:00:07 +02:00
|
|
|
function output( c, n ) {
|
|
|
|
var json = Object.toJSON( c );
|
2006-08-13 17:15:15 +02:00
|
|
|
|
2006-08-22 07:00:07 +02:00
|
|
|
writeFile( dir + "/data/jquery-" + n + "-json.js", json );
|
|
|
|
writeFile( dir + "/data/jquery-" + n + "-jsonp.js", "docsLoaded(" + json + ")" );
|
2006-08-13 17:15:15 +02:00
|
|
|
|
2006-08-22 07:00:07 +02:00
|
|
|
Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 };
|
|
|
|
|
|
|
|
var xml = Object.toXML( n == "docs" ? { method: c } : c, "docs" );
|
2006-10-10 02:23:18 +02:00
|
|
|
|
2006-10-10 03:17:47 +02:00
|
|
|
xml = xml.replace("<docs>", "<docs version='" + read("version.txt").slice(0,-1) + "'>");
|
|
|
|
|
2006-08-22 07:00:07 +02:00
|
|
|
writeFile( dir + "/data/jquery-" + n + "-xml.xml",
|
|
|
|
"<?xml version='1.0' encoding='ISO-8859-1'?>\n" + xml );
|
2006-08-13 17:15:15 +02:00
|
|
|
|
2006-08-22 07:00:07 +02:00
|
|
|
writeFile( dir + "/" + ( n == "docs" ? "index" : n ) + ".xml",
|
|
|
|
"<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
|
2006-09-01 07:52:26 +02:00
|
|
|
"<?xml-stylesheet type='text/xsl' href='style/" + n + ".xsl'?>\n" + xml
|
2006-08-22 07:00:07 +02:00
|
|
|
);
|
|
|
|
}
|