Index: components/wug/generator/gen_sources.py |
diff --git a/components/wug/generator/gen_sources.py b/components/wug/generator/gen_sources.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0a2269d44a0b3fa5270805d62a8f17ada11200d1 |
--- /dev/null |
+++ b/components/wug/generator/gen_sources.py |
@@ -0,0 +1,20 @@ |
+# 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 |
+ |
+from declaration import Declaration |
+import view_model |
+import web_ui_view |
+import util |
+ |
+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) |
+declaration = Declaration(declaration_path) |
+view_model.Gen(declaration, destination) |
+web_ui_view.Gen(declaration, destination) |
+ |