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

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

Issue 427623002: Polymer transformer logs now show on the frontend for pub serve. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moved some logic to the isPrimary function Created 6 years, 4 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// Logic to combine all the ._buildLog.* logs into one ._buildLog file.
6 library polymer.src.build.log_combiner;
7
8 import 'dart:async';
9
10 import 'package:barback/barback.dart';
11
12 import 'common.dart';
13 import 'wrapped_logger.dart';
14
15 class LogCombiner extends Transformer with PolymerTransformer {
Siggi Cherem (dart-lang) 2014/08/01 21:31:52 (a) nit: let's add a Dart doc here too. Might be t
jakemac 2014/08/04 19:49:58 Done.
16
Siggi Cherem (dart-lang) 2014/08/01 21:31:52 nit: remove empty line
jakemac 2014/08/04 19:49:58 Done.
17 final TransformOptions options;
18
19 LogCombiner(this.options);
20
21 // Run only on entry point html files in !releaseMode.
22 Future<bool> isPrimary(idOrAsset) {
Siggi Cherem (dart-lang) 2014/08/01 21:31:52 same here: change to 'bool', and remove new Future
jakemac 2014/08/04 19:49:58 Done.
23 if (options.releaseMode) return false;
24 var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id;
25 return new Future.value(options.isHtmlEntryPoint(id));
26 }
27
28 Future apply(Transform transform) {
29 return WrappedLogger.combineLogFiles(transform);
30 }
31
Siggi Cherem (dart-lang) 2014/08/01 21:31:52 nit: remove empty line
jakemac 2014/08/04 19:49:58 Done.
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698