OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, 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 library shelf.hop_runner; |
| 6 |
| 7 import 'dart:async'; |
| 8 import 'dart:io'; |
| 9 import 'package:hop/hop.dart'; |
| 10 import 'package:hop/hop_tasks.dart'; |
| 11 import 'package:hop_docgen/hop_docgen.dart'; |
| 12 import '../test/harness_console.dart' as test_console; |
| 13 |
| 14 void main(List<String> args) { |
| 15 addTask('test', createUnitTestTask(test_console.main)); |
| 16 |
| 17 // |
| 18 // Analyzer |
| 19 // |
| 20 addTask('analyze_libs', createAnalyzerTask(_getLibs)); |
| 21 |
| 22 addTask('docs', createDocGenTask('../compiled_dartdoc_viewer')); |
| 23 |
| 24 runHop(args); |
| 25 } |
| 26 |
| 27 Future<List<String>> _getLibs() { |
| 28 return new Directory('lib').list() |
| 29 .where((FileSystemEntity fse) => fse is File) |
| 30 .map((File file) => file.path) |
| 31 .toList(); |
| 32 } |
OLD | NEW |