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

Unified Diff: components/webui_generator/generator/gen_sources.py

Issue 928163002: Initial implementation of WebUI generator (WUG) toolkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 10 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 | « components/webui_generator/generator/export_h.py ('k') | components/webui_generator/generator/html_view.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webui_generator/generator/gen_sources.py
diff --git a/components/webui_generator/generator/gen_sources.py b/components/webui_generator/generator/gen_sources.py
new file mode 100644
index 0000000000000000000000000000000000000000..6b9a87a6c9b6b0d43df5c0439d73e5c611744f5d
--- /dev/null
+++ b/components/webui_generator/generator/gen_sources.py
@@ -0,0 +1,27 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import os.path
+import sys
+
+from declaration import Declaration
+import export_h
+import util
+import view_model
+import web_ui_view
+
+args = util.CreateArgumentParser().parse_args()
+declaration_path = os.path.relpath(args.declaration, args.root)
+destination = os.path.relpath(args.destination, args.root)
+os.chdir(args.root)
+try:
+ declaration = Declaration(declaration_path)
+except Exception as e:
+ print >> sys.stderr, e.message
+ sys.exit(1)
+view_model.Gen(declaration, destination)
+web_ui_view.Gen(declaration, destination)
+export_h.Gen(declaration, destination)
+
« no previous file with comments | « components/webui_generator/generator/export_h.py ('k') | components/webui_generator/generator/html_view.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698