| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'dart:io'; |
| 6 |
| 7 import 'package:analyzer/src/summary/idl.dart'; |
| 8 import 'package:analyzer/src/summary/inspect.dart'; |
| 9 |
| 10 main(List<String> args) { |
| 11 if (args.length != 1) { |
| 12 print('Usage: inspect PATH'); |
| 13 exitCode = 1; |
| 14 return; |
| 15 } |
| 16 String path = args[0]; |
| 17 List<int> bytes = new File(path).readAsBytesSync(); |
| 18 PackageBundle bundle = new PackageBundle.fromBuffer(bytes); |
| 19 SummaryInspector inspector = new SummaryInspector(); |
| 20 print(inspector.dumpPackageBundle(bundle).join('\n')); |
| 21 } |
| OLD | NEW |