| // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| library shelf.hop_runner; |
| |
| import 'dart:async'; |
| import 'dart:io'; |
| import 'package:hop/hop.dart'; |
| import 'package:hop/hop_tasks.dart'; |
| import 'package:hop_docgen/hop_docgen.dart'; |
| import '../test/harness_console.dart' as test_console; |
| |
| void main(List<String> args) { |
| addTask('test', createUnitTestTask(test_console.main)); |
| |
| // |
| // Analyzer |
| // |
| addTask('analyze_libs', createAnalyzerTask(_getLibs)); |
| |
| addTask('docs', createDocGenTask('../compiled_dartdoc_viewer')); |
| |
| runHop(args); |
| } |
| |
| Future<List<String>> _getLibs() { |
| return new Directory('lib').list() |
| .where((FileSystemEntity fse) => fse is File) |
| .map((File file) => file.path) |
| .toList(); |
| } |