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

Side by Side Diff: pkg/polymer/lib/src/build/runner.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. 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 | « pkg/polymer/lib/deploy.dart ('k') | pkg/polymer/test/build/common.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 /** 5 /**
6 * Definitions used to run the polymer linter and deploy tools without using 6 * Definitions used to run the polymer linter and deploy tools without using
7 * pub serve or pub deploy. 7 * pub serve or pub deploy.
8 */ 8 */
9 library polymer.src.build.runner; 9 library polymer.src.build.runner;
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 addAssets(options.currentPackage, 'web'); 167 addAssets(options.currentPackage, 'web');
168 if (options.transformTests) addAssets(options.currentPackage, 'test'); 168 if (options.transformTests) addAssets(options.currentPackage, 'test');
169 169
170 barback.updateSources(assets); 170 barback.updateSources(assets);
171 } 171 }
172 172
173 /** Attach error listeners on [barback] so we can report errors. */ 173 /** Attach error listeners on [barback] so we can report errors. */
174 void _attachListeners(Barback barback) { 174 void _attachListeners(Barback barback) {
175 // Listen for errors and results 175 // Listen for errors and results
176 barback.errors.listen((e) { 176 barback.errors.listen((e) {
177 var trace = getAttachedStackTrace(e); 177 var trace = null;
178 if (e is Error) trace = e.stackTrace;
178 if (trace != null) { 179 if (trace != null) {
179 print(Trace.format(trace)); 180 print(Trace.format(trace));
180 } 181 }
181 print('error running barback: $e'); 182 print('error running barback: $e');
182 exit(1); 183 exit(1);
183 }); 184 });
184 185
185 barback.results.listen((result) { 186 barback.results.listen((result) {
186 if (!result.succeeded) { 187 if (!result.succeeded) {
187 print("build failed with errors: ${result.errors}"); 188 print("build failed with errors: ${result.errors}");
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 Future _copyFile(String inpath, String outpath) { 304 Future _copyFile(String inpath, String outpath) {
304 _ensureDir(path.dirname(outpath)); 305 _ensureDir(path.dirname(outpath));
305 return new File(inpath).openRead().pipe(new File(outpath).openWrite()); 306 return new File(inpath).openRead().pipe(new File(outpath).openWrite());
306 } 307 }
307 308
308 /** Write contents of an [asset] into a file at [filepath]. */ 309 /** Write contents of an [asset] into a file at [filepath]. */
309 Future _writeAsset(String filepath, Asset asset) { 310 Future _writeAsset(String filepath, Asset asset) {
310 _ensureDir(path.dirname(filepath)); 311 _ensureDir(path.dirname(filepath));
311 return asset.read().pipe(new File(filepath).openWrite()); 312 return asset.read().pipe(new File(filepath).openWrite());
312 } 313 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/deploy.dart ('k') | pkg/polymer/test/build/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698