Index: bin/library_size_split.dart |
diff --git a/bin/library_size_split.dart b/bin/library_size_split.dart |
index 8dd419aa8bd665014bee82ea538a0d4b682f14ae..9221bf49f7b7c11de599aa90bca8b2d4ecd1d94b 100644 |
--- a/bin/library_size_split.dart |
+++ b/bin/library_size_split.dart |
@@ -59,23 +59,21 @@ |
/// This example is very similar to [defaultGrouping]. |
library dart2js_info.bin.library_size_split; |
-import 'dart:convert'; |
import 'dart:io'; |
import 'dart:math' show max; |
import 'package:dart2js_info/info.dart'; |
+import 'package:dart2js_info/src/util.dart'; |
import 'package:yaml/yaml.dart'; |
-main(args) { |
+main(args) async { |
if (args.length < 1) { |
print('usage: dart tool/library_size_split.dart ' |
'path-to-info.json [grouping.yaml]'); |
exit(1); |
} |
- var filename = args[0]; |
- var json = JSON.decode(new File(filename).readAsStringSync()); |
- var info = new AllInfoJsonCodec().decode(json); |
+ var info = await infoFromFile(args.first); |
var groupingText = |
args.length > 1 ? new File(args[1]).readAsStringSync() : defaultGrouping; |