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

Unified Diff: sky/tools/skyx/bin/skyx.dart

Issue 1222673003: Add skyx packages for all the Sky demos (except game) (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: re-upload Created 5 years, 6 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 | « sky/tools/skyx.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/skyx/bin/skyx.dart
diff --git a/sky/tools/skyx/bin/skyx.dart b/sky/tools/skyx/bin/skyx.dart
index 989b5c5d204957fcfdb922741df7ce0d93a6b64c..9bab5e110724e944254af87fb7df0b88659eb9fd 100644
--- a/sky/tools/skyx/bin/skyx.dart
+++ b/sky/tools/skyx/bin/skyx.dart
@@ -65,6 +65,8 @@ Iterable<MaterialAsset> parseMaterialAssets(Map manifestDescriptor) sync* {
}
Future loadManifest(String manifestPath) async {
+ if (manifestPath == null)
+ return null;
String manifestDescriptor = await new File(manifestPath).readAsString();
return loadYaml(manifestDescriptor);
}
@@ -85,8 +87,9 @@ main(List<String> argv) async {
ArgParser parser = new ArgParser();
parser.addFlag('help', abbr: 'h', negatable: false);
parser.addOption('asset-base');
- parser.addOption('snapshot');
+ parser.addOption('manifest');
parser.addOption('output-file', abbr: 'o');
+ parser.addOption('snapshot');
ArgResults args = parser.parse(argv);
if (args['help']) {
@@ -94,8 +97,7 @@ main(List<String> argv) async {
return;
}
- String manifestPath = args.rest.first;
-
+ String manifestPath = args['manifest'];
Map manifestDescriptor = await loadManifest(manifestPath);
Iterable<MaterialAsset> materialAssets = parseMaterialAssets(manifestDescriptor);
« no previous file with comments | « sky/tools/skyx.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698