Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the documentation parser to work with categories. Additionall…
…y, I updated the copyright notice in the jQuery header and removed some extraneous whitespace from jQuery Lite.
- Loading branch information
Showing
5 changed files
with
52 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,6 +1,6 @@ | |||
load("build/js/writeFile.js"); | load("build/js/writeFile.js"); | ||
|
|
||
var blockMatch = /\s*\/\*\*\s*((.|\n)*?)\s*\*\/\n*/g; | var blockMatch = /\s*\/\*\*\s*((.|\n)*?)\s*\*\/\n*/g; | ||
var f = readFile(arguments[0]).replace( blockMatch, "\n" ); | var f = readFile(arguments[0]).replace( blockMatch, "\n" ).replace( /\n\n+/g, "\n\n" ); | ||
|
|
||
writeFile( arguments[1], f ); | writeFile( arguments[1], f ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,19 +1,28 @@ | |||
load("build/js/json.js", "build/js/xml.js", "build/js/writeFile.js", "build/js/parse.js"); | load("build/js/json.js", "build/js/xml.js", "build/js/writeFile.js", "build/js/parse.js"); | ||
|
|
||
var dir = arguments[1]; | |||
|
|||
var c = parse( readFile(arguments[0]) ); | var c = parse( readFile(arguments[0]) ); | ||
var json = Object.toJSON( c ); | output( c, "docs" ); | ||
|
|
||
writeFile( arguments[1] + "/data/jquery-docs-json.js", json ); | c = categorize( c ); | ||
writeFile( arguments[1] + "/data/jquery-docs-jsonp.js", "docsLoaded(" + json + ")" ); | output( c, "cat" ); | ||
|
|
||
Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 }; | function output( c, n ) { | ||
var json = Object.toJSON( c ); | |||
|
|
||
var xml = Object.toXML( { method: c }, "docs" ); | writeFile( dir + "/data/jquery-" + n + "-json.js", json ); | ||
writeFile( dir + "/data/jquery-" + n + "-jsonp.js", "docsLoaded(" + json + ")" ); | |||
|
|
||
writeFile( arguments[1] + "/data/jquery-docs-xml.xml", | Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 }; | ||
"<?xml version='1.0' encoding='ISO-8859-1'?>\n" + xml ); |
|
||
var xml = Object.toXML( n == "docs" ? { method: c } : c, "docs" ); | |||
|
|||
writeFile( dir + "/data/jquery-" + n + "-xml.xml", | |||
"<?xml version='1.0' encoding='ISO-8859-1'?>\n" + xml ); | |||
|
|
||
writeFile( arguments[1] + "/index.xml", | writeFile( dir + "/" + ( n == "docs" ? "index" : n ) + ".xml", | ||
"<?xml version='1.0' encoding='ISO-8859-1'?>\n" + | "<?xml version='1.0' encoding='ISO-8859-1'?>\n" + | ||
"<?xml-stylesheet type='text/xsl' href='style/docs.xsl'?>\n" + xml | "<?xml-stylesheet type='text/xsl' href='style/docs.xsl'?>\n" + xml | ||
); | ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters