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

Unified Diff: tools/json_schema_compiler/create_externs.sh

Issue 1006373003: Generate externs automatically from json/idl files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Edits Created 5 years, 9 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
Index: tools/json_schema_compiler/create_externs.sh
diff --git a/tools/json_schema_compiler/create_externs.sh b/tools/json_schema_compiler/create_externs.sh
new file mode 100755
index 0000000000000000000000000000000000000000..bf5b3f1deedeb83322db60e405fbb4c6aea66c32
--- /dev/null
+++ b/tools/json_schema_compiler/create_externs.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
Dan Beam 2015/03/19 19:15:02 :_(
Devlin 2015/03/19 20:59:57 Actually, why is this file even here? Removing.
+#
+# Reads the IDL files from chrome/common/extensions/api/ and
+# writes JS externs for the Closure Compiler to stdout.
+
+schema_compiler_dir=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
+chromium_src_dir="${schema_compiler_dir}/../.."
+
+set -e
+
+for f in ${chromium_src_dir}/chrome/common/extensions/api/*.idl; do
+ "${schema_compiler_dir}/compiler.py" "${f}" \
+ --root=${chromium_src_dir} \
+ --generator=externs
+done

Powered by Google App Engine
This is Rietveld 408576698