OLD | NEW |
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 /** Includes any additional polyfills that may needed by the deployed app. */ | 5 /** Includes any additional polyfills that may needed by the deployed app. */ |
6 library polymer.src.build.polyfill_injector; | 6 library polymer.src.build.polyfill_injector; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 | 9 |
10 import 'package:barback/barback.dart'; | 10 import 'package:barback/barback.dart'; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 _addScript('custom_element/custom-elements$suffix'); | 105 _addScript('custom_element/custom-elements$suffix'); |
106 } | 106 } |
107 | 107 |
108 // This polyfill needs to be the first one on the head | 108 // This polyfill needs to be the first one on the head |
109 if (!shadowDomFound) _addScript('shadow_dom/shadow_dom$suffix'); | 109 if (!shadowDomFound) _addScript('shadow_dom/shadow_dom$suffix'); |
110 | 110 |
111 transform.addOutput( | 111 transform.addOutput( |
112 new Asset.fromString(transform.primaryInput.id, document.outerHtml)); | 112 new Asset.fromString(transform.primaryInput.id, document.outerHtml)); |
113 }); | 113 }); |
114 } | 114 } |
| 115 |
| 116 String toString() => 'polymer-polyfill-injector'; |
115 } | 117 } |
116 | 118 |
117 final _shadowDomJS = new RegExp(r'shadow_dom\..*\.js', caseSensitive: false); | 119 final _shadowDomJS = new RegExp(r'shadow_dom\..*\.js', caseSensitive: false); |
118 final _customElementJS = new RegExp(r'custom-elements\..*\.js', | 120 final _customElementJS = new RegExp(r'custom-elements\..*\.js', |
119 caseSensitive: false); | 121 caseSensitive: false); |
OLD | NEW |