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

Side by Side Diff: lib/build/mirrors_remover.dart

Issue 1026153002: add initWebComponents (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: code review updates Created 5 years, 9 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
« no previous file with comments | « CHANGELOG.md ('k') | lib/init.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, 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 library web_components.build.mirrors_remover;
5
6 import 'dart:async';
7 import 'package:barback/barback.dart';
8
9 /// Removes `mirror_initializer.dart` and replaces it with
10 /// `static_initializer.dart`.
11 class MirrorsRemoverTransformer extends Transformer {
12 MirrorsRemoverTransformer();
13 MirrorsRemoverTransformer.asPlugin(BarbackSettings settings);
14
15 bool isPrimary(AssetId id) => id.path == 'lib/src/init.dart';
16
17 @override
18 Future apply(Transform transform) async {
19 String source = await transform.primaryInput.readAsString();
20 source = source.replaceFirst(
21 'mirror_initializer.dart', 'static_initializer.dart');
22 transform.addOutput(
23 new Asset.fromString(transform.primaryInput.id, source));
24 }
25 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/init.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698