Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Side by Side Diff: sdk/lib/_internal/pub/lib/src/barback.dart

Issue 66133002: Add a missing type name. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix more stuff Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback/sources.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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; 5 library pub.barback;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:barback/barback.dart'; 9 import 'package:barback/barback.dart';
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 BarbackMode mode, {Iterable<Transformer> builtInTransformers, 112 BarbackMode mode, {Iterable<Transformer> builtInTransformers,
113 WatcherType watcher: WatcherType.AUTO}) { 113 WatcherType watcher: WatcherType.AUTO}) {
114 var provider = new PubPackageProvider(graph); 114 var provider = new PubPackageProvider(graph);
115 var barback = new Barback(provider); 115 var barback = new Barback(provider);
116 116
117 barback.log.listen(_log); 117 barback.log.listen(_log);
118 118
119 return BarbackServer.bind(host, port, barback, graph.entrypoint.root.name) 119 return BarbackServer.bind(host, port, barback, graph.entrypoint.root.name)
120 .then((server) { 120 .then((server) {
121 return new Future.sync(() { 121 return new Future.sync(() {
122 if (watcher == WatcherType.NONE) { 122 if (watcher != WatcherType.NONE) {
123 loadSources(graph, barback); 123 return watchSources(graph, barback, watcher);
124 return;
125 } 124 }
126 125
127 return watchSources(graph, barback, (directory) { 126 loadSources(graph, barback);
128 if (watcher == WatcherType.AUTO) return new DirectoryWatcher(directory);
129 return new PollingDirectoryWatcher(directory);
130 });
131 }).then((_) { 127 }).then((_) {
132 var completer = new Completer(); 128 var completer = new Completer();
133 129
134 // If any errors get emitted either by barback or by the server, including 130 // If any errors get emitted either by barback or by the server, including
135 // non-programmatic barback errors, they should take down the whole 131 // non-programmatic barback errors, they should take down the whole
136 // program. 132 // program.
137 var subscriptions = [ 133 var subscriptions = [
138 server.barback.errors.listen((error) { 134 server.barback.errors.listen((error) {
139 if (error is TransformerException) error = error.error; 135 if (error is TransformerException) error = error.error;
140 if (!completer.isCompleted) completer.completeError(error); 136 if (!completer.isCompleted) completer.completeError(error);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 301
306 case LogLevel.WARNING: 302 case LogLevel.WARNING:
307 log.warning("${log.yellow(prefix)}\n$message"); 303 log.warning("${log.yellow(prefix)}\n$message");
308 break; 304 break;
309 305
310 case LogLevel.INFO: 306 case LogLevel.INFO:
311 log.message("$prefix\n$message"); 307 log.message("$prefix\n$message");
312 break; 308 break;
313 } 309 }
314 } 310 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback/sources.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698