summaryrefslogtreecommitdiffstats
path: root/o3d/documentation
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 23:23:11 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 23:23:11 +0000
commit721d873dacf77a46f88d15d57ea7103d73635624 (patch)
treecd96f9c5504f88b2f738f2dcbc10e1687f9ef96f /o3d/documentation
parent5fdafb2f68bd61ef92d10194402348d1e5839015 (diff)
downloadchromium_src-721d873dacf77a46f88d15d57ea7103d73635624.zip
chromium_src-721d873dacf77a46f88d15d57ea7103d73635624.tar.gz
chromium_src-721d873dacf77a46f88d15d57ea7103d73635624.tar.bz2
A few more docs updates.
Review URL: http://codereview.chromium.org/155461 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/documentation')
-rwxr-xr-xo3d/documentation/build_docs.py42
-rw-r--r--o3d/documentation/jsdoc-toolkit-templates/publish.js21
2 files changed, 43 insertions, 20 deletions
diff --git a/o3d/documentation/build_docs.py b/o3d/documentation/build_docs.py
index 642b0f0..0f78515 100755
--- a/o3d/documentation/build_docs.py
+++ b/o3d/documentation/build_docs.py
@@ -137,13 +137,14 @@ def RunNixysa(idl_files, generate, output_dir, nixysa_options):
idl_files)
-def RunJSDocToolkit(js_files, output_dir, prefix, o3djs):
+def RunJSDocToolkit(js_files, ezt_output_dir, html_output_dir, prefix, o3djs):
"""Executes the JSDocToolkit."""
list_filename = MakePath('../scons-out/docs/obj/doclist.conf')
f = open(list_filename, 'w')
f.write('{\nD:{\n')
f.write('prefix: "%s",\n' % prefix)
f.write('o3djs: "%s",\n' % o3djs)
+ f.write('htmlOutDir: "%s",\n' % html_output_dir.replace('\\', '/'))
f.write('endMarker: ""\n')
f.write('},\n')
f.write('_: [\n')
@@ -160,7 +161,7 @@ def RunJSDocToolkit(js_files, output_dir, prefix, o3djs):
MakePath('../third_party/jsdoctoolkit/files/app/run.js'),
'-v',
'-t=%s' % MakePath('./jsdoc-toolkit-templates//'),
- '-d=' + output_dir,
+ '-d=' + ezt_output_dir,
'-c=' + list_filename])
@@ -175,12 +176,13 @@ def BuildJavaScriptForExternsFromIDLs(idl_files, output_dir):
RunNixysa(idl_files, 'jsheader', output_dir, ['--no-return-docs'])
-def BuildO3DDocsFromJavaScript(js_files, output_dir):
- RunJSDocToolkit(js_files, output_dir, 'classo3d_1_1_', '')
+def BuildO3DDocsFromJavaScript(js_files, ezt_output_dir, html_output_dir):
+ RunJSDocToolkit(js_files, ezt_output_dir, html_output_dir,
+ 'classo3d_1_1_', '')
-def BuildO3DJSDocs(js_files, output_dir):
- RunJSDocToolkit(js_files, output_dir, 'js_0_1_', 'true')
+def BuildO3DJSDocs(js_files, ezt_output_dir, html_output_dir):
+ RunJSDocToolkit(js_files, ezt_output_dir, html_output_dir, 'js_0_1_', 'true')
def BuildO3DExternsFile(js_files_dir, extra_externs_file, externs_file):
@@ -202,6 +204,22 @@ def BuildCompiledO3DJS(o3djs_files,
_java_exe,
'-jar',
MakePath('JSCompiler_deploy.jar'),
+ '--property_renaming', 'OFF',
+ '--variable_renaming', 'LOCAL',
+ # TODO(gman): Remove the flags below once the compiled js actually works.
+ #'--pretty_print',
+ #'--inline_functions', 'False',
+ #'--remove_dead_code', 'False',
+ #'--remove_unused_vars', 'False',
+ #'--remove_unused_prototype_props', 'False',
+ #'--collapse_variable_declarations', 'False',
+ #'--collapse_variable_declarations', 'OFF',
+ #'--disable_function_inline', 'True',
+ #'--print_input_delimiter', 'True',
+ #'--remove_dead_assignments', 'False',
+ #'--strip_whitespace_and_comments_only', 'True',
+ ##'--logging_level', '',
+ '--strict',
'--externs=%s' % externs_path,
('--externs=%s' % o3d_externs_js_path),
('--js_output_file=%s' % compiled_o3djs_outpath)] +
@@ -220,9 +238,12 @@ def main():
docs_js_outpath = MakePath('../scons-out/docs/obj/documentation/apijs')
externs_js_outpath = MakePath('../scons-out/docs/obj/externs')
- o3d_docs_html_outpath = MakePath('../scons-out/docs/obj/documentation/html')
- o3djs_docs_html_outpath = MakePath(
+ o3d_docs_ezt_outpath = MakePath('../scons-out/docs/obj/documentation/html')
+ o3d_docs_html_outpath = MakePath('../scons-out/docs/obj/local_html')
+ o3djs_docs_ezt_outpath = MakePath(
'../scons-out/docs/obj/documentation/html/jsdocs')
+ o3djs_docs_html_outpath = MakePath(
+ '../scons-out/docs/obj/local_html/jsdocs')
o3d_externs_path = MakePath('../scons-out/docs/obj/o3d-externs.js')
compiled_o3djs_outpath = MakePath(
'../scons-out/docs/obj/documentation/base.js')
@@ -247,12 +268,13 @@ def main():
BuildJavaScriptForDocsFromIDLs(idl_files, docs_js_outpath)
BuildO3DDocsFromJavaScript([o3d_extra_externs_path] + docs_js_files,
- o3d_docs_html_outpath)
+ o3d_docs_ezt_outpath, o3d_docs_html_outpath)
BuildJavaScriptForExternsFromIDLs(idl_files, externs_js_outpath)
BuildO3DExternsFile(externs_js_outpath,
o3d_extra_externs_path,
o3d_externs_path)
- BuildO3DJSDocs(o3djs_files + [o3d_externs_path], o3djs_docs_html_outpath)
+ BuildO3DJSDocs(o3djs_files + [o3d_externs_path], o3djs_docs_ezt_outpath,
+ o3djs_docs_html_outpath)
BuildCompiledO3DJS(o3djs_files,
externs_path,
o3d_externs_path,
diff --git a/o3d/documentation/jsdoc-toolkit-templates/publish.js b/o3d/documentation/jsdoc-toolkit-templates/publish.js
index 053db6a..4986729 100644
--- a/o3d/documentation/jsdoc-toolkit-templates/publish.js
+++ b/o3d/documentation/jsdoc-toolkit-templates/publish.js
@@ -60,13 +60,13 @@ var g_o3djsMode = false;
function publish(symbolSet) {
publish.conf = { // trailing slash expected for dirs
ext: '.ezt',
- outDir: JSDOC.opt.d || SYS.pwd + '../out/jsdoc/',
- templatesDir: JSDOC.opt.t || SYS.pwd + '../templates/jsdoc/',
+ outDir: JSDOC.opt.d,
+ templatesDir: JSDOC.opt.t,
symbolsDir: '',
- prefix: JSDOC.opt.D.prefix || 'js_1_0_',
- o3djs: JSDOC.opt.D.o3djs || ''};
- publish.conf.srcDir = publish.conf.outDir + 'src/'
- publish.conf.htmlDir = publish.conf.outDir + 'original_html/'
+ prefix: JSDOC.opt.D.prefix,
+ o3djs: JSDOC.opt.D.o3djs};
+ publish.conf.srcDir = publish.conf.outDir + 'src/';
+ publish.conf.htmlDir = JSDOC.opt.D.htmlOutDir;
if (publish.conf.o3djs) {
g_o3djsMode = true;
@@ -83,6 +83,7 @@ function publish(symbolSet) {
}
// create the folders and subfolders to hold the output
+ IO.mkPath((publish.conf.outDir).split('/'));
IO.mkPath((publish.conf.htmlDir).split('/'));
// used to allow Link to check the details of things being linked to
@@ -296,9 +297,9 @@ function resolveLinks(str) {
/**
* Makes a link for a symbol.
- *
- * @param {string} symbolName Name of symbol
- * @param {string} extra extra
+ *
+ * @param {string} symbolName Name of symbol
+ * @param {string} extra extra
* @param {string} opt_bookmark Optional bookmark.
*/
function makeSymbolLink(symbolName, extra, opt_bookmark) {
@@ -307,7 +308,7 @@ function makeSymbolLink(symbolName, extra, opt_bookmark) {
prefix = '../classo3d_1_1_';
}
return (prefix + symbolName + extra +
- '.html').toLowerCase() +
+ '.html').toLowerCase() +
(opt_bookmark ? '#' + opt_bookmark : '');
}