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

Unified Diff: pkg/polymer/lib/src/build/polyfill_injector.dart

Issue 61193002: Add a build filter (only necessary HTML files are emitted) and logic to use .min.js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/lib/src/build/common.dart ('k') | pkg/polymer/lib/transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/build/polyfill_injector.dart
diff --git a/pkg/polymer/lib/src/build/polyfill_injector.dart b/pkg/polymer/lib/src/build/polyfill_injector.dart
index c809d8f999482d77accfac4333f8f8294c51f899..fefc14821ddb932b6a9e173d5f53b92311318ca0 100644
--- a/pkg/polymer/lib/src/build/polyfill_injector.dart
+++ b/pkg/polymer/lib/src/build/polyfill_injector.dart
@@ -2,10 +2,7 @@
// 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.
-/**
- * Final phase of the polymer transformation: includes any additional polyfills
- * that may needed by the deployed app.
- */
+/** Includes any additional polyfills that may needed by the deployed app. */
library polymer.src.build.polyfill_injector;
import 'dart:async';
@@ -99,13 +96,17 @@ class PolyfillInjector extends Transformer with PolymerTransformer {
// JS interop code is required for Polymer CSS shimming.
if (!jsInteropFound) _addScript('browser/interop.js');
+
+ // TODO(sigmund): enable using .min.js. This currently fails in checked
+ // mode because of bugs in dart2js mirrors (dartbug.com/14720).
+ // var suffix = options.releaseMode ? '.min.js' : '.debug.js';
+ var suffix = '.debug.js';
if (!customElementFound) {
- _addScript('custom_element/custom-elements.debug.js');
+ _addScript('custom_element/custom-elements$suffix');
}
// This polyfill needs to be the first one on the head
- // TODO(jmesserly): this is .debug to workaround issue 13046.
- if (!shadowDomFound) _addScript('shadow_dom/shadow_dom.debug.js');
+ if (!shadowDomFound) _addScript('shadow_dom/shadow_dom$suffix');
transform.addOutput(
new Asset.fromString(transform.primaryInput.id, document.outerHtml));
« no previous file with comments | « pkg/polymer/lib/src/build/common.dart ('k') | pkg/polymer/lib/transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698