Chromium Code Reviews| Index: pkg/polymer/lib/src/build/log_combiner.dart |
| diff --git a/pkg/polymer/lib/src/build/log_combiner.dart b/pkg/polymer/lib/src/build/log_combiner.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..00ab7e2a54e8fd4cc67ce049371e72079fb11a01 |
| --- /dev/null |
| +++ b/pkg/polymer/lib/src/build/log_combiner.dart |
| @@ -0,0 +1,32 @@ |
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +/// Logic to combine all the ._buildLog.* logs into one ._buildLog file. |
| +library polymer.src.build.log_combiner; |
| + |
| +import 'dart:async'; |
| + |
| +import 'package:barback/barback.dart'; |
| + |
| +import 'common.dart'; |
| +import 'wrapped_logger.dart'; |
| + |
| +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.
|
| + |
|
Siggi Cherem (dart-lang)
2014/08/01 21:31:52
nit: remove empty line
jakemac
2014/08/04 19:49:58
Done.
|
| + final TransformOptions options; |
| + |
| + LogCombiner(this.options); |
| + |
| + // Run only on entry point html files in !releaseMode. |
| + 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.
|
| + if (options.releaseMode) return false; |
| + var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id; |
| + return new Future.value(options.isHtmlEntryPoint(id)); |
| + } |
| + |
| + Future apply(Transform transform) { |
| + return WrappedLogger.combineLogFiles(transform); |
| + } |
| + |
|
Siggi Cherem (dart-lang)
2014/08/01 21:31:52
nit: remove empty line
jakemac
2014/08/04 19:49:58
Done.
|
| +} |