Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2435)

Unified Diff: chrome/common/extensions/docs/build/build.py

Issue 10082038: Hack together a quick doc generator for IDL files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: separate alarms change Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/docs/build/directory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/build/build.py
diff --git a/chrome/common/extensions/docs/build/build.py b/chrome/common/extensions/docs/build/build.py
index 4f137a97cc44d4a473cb56303232a4555da29516..d08f1d1c22218e9a5752be93a2c8436efd1f5699 100755
--- a/chrome/common/extensions/docs/build/build.py
+++ b/chrome/common/extensions/docs/build/build.py
@@ -27,6 +27,8 @@ _extension_api_dir = os.path.normpath(_base_dir + "/../api")
_extension_api_json_schemas = glob.glob(_extension_api_dir +
'/[a-zA-Z0-9]*.json')
+_extension_api_idl_schemas = glob.glob(_extension_api_dir +
+ '/[a-zA-Z0-9]*.idl')
_api_template_html = _template_dir + "/api_template.html"
_page_shell_html = _template_dir + "/page_shell.html"
_generator_html = _build_dir + "/generator.html"
@@ -193,7 +195,8 @@ def main():
dump_render_tree = FindDumpRenderTree()
# Load the manifest of existing API Methods
- api_manifest = ApiManifest(_extension_api_json_schemas)
+ api_manifest = ApiManifest(_extension_api_json_schemas,
+ _extension_api_idl_schemas)
# Read static file names
static_names = GetStaticFileNames()
@@ -212,6 +215,9 @@ def main():
raise Exception("--page-name argument must be one of %s." %
', '.join(sorted(page_names)))
+ # Write temporary JSON files based on the IDL inputs
+ api_manifest.generateJSONFromIDL()
+
# Render a manifest file containing metadata about all the extension samples
samples_manifest = SamplesManifest(_samples_dir, _base_dir, api_manifest)
samples_manifest.writeToFile(_samples_json)
@@ -243,6 +249,9 @@ def main():
if (os.path.isfile(debug_log)):
os.remove(debug_log)
+ # Cleanup our temporary IDL->JSON files
+ api_manifest.cleanupGeneratedFiles()
+
if 'EX_OK' in dir(os):
return os.EX_OK
else:
« no previous file with comments | « no previous file | chrome/common/extensions/docs/build/directory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698