| OLD | NEW |
| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:barback/barback.dart'; | 7 import 'package:barback/barback.dart'; |
| 8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
| 9 | 9 |
| 10 import '../barback/asset_environment.dart'; | 10 import '../barback/asset_environment.dart'; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 }); | 81 }); |
| 82 | 82 |
| 83 // If we're using JSON output, the regular server logging is disabled. | 83 // If we're using JSON output, the regular server logging is disabled. |
| 84 // Instead, we collect it here to include in the final JSON result. | 84 // Instead, we collect it here to include in the final JSON result. |
| 85 if (log.json.enabled) { | 85 if (log.json.enabled) { |
| 86 environment.barback.log.listen( | 86 environment.barback.log.listen( |
| 87 (entry) => logJson.add(_logEntryToJson(entry))); | 87 (entry) => logJson.add(_logEntryToJson(entry))); |
| 88 } | 88 } |
| 89 | 89 |
| 90 var assets = await log.progress("Building ${entrypoint.root.name}", | 90 var assets = await log.progress/*<AssetSet>*/( |
| 91 () async { | 91 "Building ${entrypoint.root.name}", () async { |
| 92 // Register all of the build directories. | 92 // Register all of the build directories. |
| 93 // TODO(rnystrom): We don't actually need to bind servers for these, we | 93 // TODO(rnystrom): We don't actually need to bind servers for these, we |
| 94 // just need to add them to barback's sources. Add support to | 94 // just need to add them to barback's sources. Add support to |
| 95 // BuildEnvironment for going the latter without the former. | 95 // BuildEnvironment for going the latter without the former. |
| 96 await Future.wait(sourceDirectories.map( | 96 await Future.wait(sourceDirectories.map( |
| 97 (dir) => environment.serveDirectory(dir))); | 97 (dir) => environment.serveDirectory(dir))); |
| 98 | 98 |
| 99 return environment.barback.getAllAssets(); | 99 return environment.barback.getAllAssets(); |
| 100 }); | 100 }); |
| 101 | 101 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 "end": { | 257 "end": { |
| 258 "line": entry.span.end.line, | 258 "line": entry.span.end.line, |
| 259 "column": entry.span.end.column | 259 "column": entry.span.end.column |
| 260 }, | 260 }, |
| 261 }; | 261 }; |
| 262 } | 262 } |
| 263 | 263 |
| 264 return data; | 264 return data; |
| 265 } | 265 } |
| 266 } | 266 } |
| OLD | NEW |