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

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

Issue 513023002: Step one towards stable error messages with details: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months 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/src/build/build_filter.dart ('k') | pkg/polymer/lib/src/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 /// Logic to combine all the ._buildLog.* logs into one ._buildLog file. 5 /// Logic to combine all the ._buildLog.* logs into one ._buildLog file.
6 library polymer.src.build.log_combiner; 6 library polymer.src.build.log_combiner;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 import 'package:barback/barback.dart'; 10 import 'package:barback/barback.dart';
11 import 'package:code_transformers/messages/build_logger.dart';
11 import 'package:html5lib/parser.dart' show parseFragment; 12 import 'package:html5lib/parser.dart' show parseFragment;
12 13
13 import 'common.dart'; 14 import 'common.dart';
14 import 'wrapped_logger.dart';
15 15
16 /// Logic to combine all the ._buildLog.* logs into one ._buildLog file. 16 /// Logic to combine all the ._buildLog.* logs into one ._buildLog file.
17 class BuildLogCombiner extends Transformer with PolymerTransformer { 17 class BuildLogCombiner extends Transformer with PolymerTransformer {
18 final TransformOptions options; 18 final TransformOptions options;
19 19
20 BuildLogCombiner(this.options); 20 BuildLogCombiner(this.options);
21 21
22 /// Run only on entry point html files and only if 22 /// Run only on entry point html files and only if
23 /// options.injectBuildLogsInOutput is true. 23 /// options.injectBuildLogsInOutput is true.
24 bool isPrimary(idOrAsset) { 24 bool isPrimary(idOrAsset) {
25 if (!options.injectBuildLogsInOutput) return false; 25 if (!options.injectBuildLogsInOutput) return false;
26 var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id; 26 var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id;
27 return options.isHtmlEntryPoint(id); 27 return options.isHtmlEntryPoint(id);
28 } 28 }
29 29
30 Future apply(Transform transform) { 30 Future apply(Transform transform) {
31 // Combine all ._buildLogs* files into one ._buildLogs file. 31 // Combine all ._buildLogs* files into one ._buildLogs file.
32 return WrappedLogger.combineLogFiles(transform); 32 return BuildLogger.combineLogFiles(transform);
33 } 33 }
34 } 34 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/build/build_filter.dart ('k') | pkg/polymer/lib/src/build/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698