OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library pub.barback.source_directory; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 | 6 |
9 import 'package:watcher/watcher.dart'; | 7 import 'package:watcher/watcher.dart'; |
10 | 8 |
11 import 'asset_environment.dart'; | 9 import 'asset_environment.dart'; |
12 import 'barback_server.dart'; | 10 import 'barback_server.dart'; |
13 | 11 |
14 /// A directory in the entrypoint package whose contents have been made | 12 /// A directory in the entrypoint package whose contents have been made |
15 /// available to barback and that are bound to a server. | 13 /// available to barback and that are bound to a server. |
16 class SourceDirectory { | 14 class SourceDirectory { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Stop watching the directory. | 57 // Stop watching the directory. |
60 if (watchSubscription != null) { | 58 if (watchSubscription != null) { |
61 var cancel = watchSubscription.cancel(); | 59 var cancel = watchSubscription.cancel(); |
62 if (cancel != null) futures.add(cancel); | 60 if (cancel != null) futures.add(cancel); |
63 } | 61 } |
64 | 62 |
65 return Future.wait(futures); | 63 return Future.wait(futures); |
66 }); | 64 }); |
67 } | 65 } |
68 } | 66 } |
OLD | NEW |