script compactor now names its bootstrap file based off the html entrypoint, not the dart file

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1012143007
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c0c07b..6de608f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,11 @@
-#### 0.10.6
+#### 0.11.0
   * Add `bindingStartDelimiters` option to the `ImportInlinerTransformer`. Any
     urls which contain any of the supplied delimiters before the first `/` will
     be left alone since they can't be reasoned about. If you want these urls to
     be treated as relative to the current path you should add a `./` in front.
+  * The `ScriptCompactorTransformer` now names its bootstrap file based on the
+    entry point html file, instead of the original dart file. This is ensure it
+    is the original package.
 
 #### 0.10.5+3
   * Fix normalization of relative paths inside of deep relative imports,
diff --git a/lib/build/script_compactor.dart b/lib/build/script_compactor.dart
index b3786f2..3492160 100644
--- a/lib/build/script_compactor.dart
+++ b/lib/build/script_compactor.dart
@@ -104,8 +104,8 @@
   /// Builds the bootstrap file and returns the path to it relative to
   /// [primaryInput].
   Asset _buildBootstrapFile(AssetId mainScript, Set<AssetId> importScripts) {
-    var bootstrapId = new AssetId(mainScript.package,
-        mainScript.path.replaceFirst('.dart', '.bootstrap.dart'));
+    var bootstrapId = new AssetId(primaryInput.package,
+        primaryInput.path.replaceFirst('.html', '.bootstrap.dart'));
 
     var buffer = new StringBuffer();
     buffer.writeln('library ${_libraryNameFor(bootstrapId)};');
diff --git a/pubspec.yaml b/pubspec.yaml
index ce70bc0..9133a77 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: web_components
-version: 0.10.6
+version: 0.11.0
 author: Polymer.dart Authors <web-ui-dev@dartlang.org>
 homepage: https://www.dartlang.org/polymer-dart/
 description: >
diff --git a/test/build/script_compactor_test.dart b/test/build/script_compactor_test.dart
index 22408db..b182c31 100644
--- a/test/build/script_compactor_test.dart
+++ b/test/build/script_compactor_test.dart
@@ -120,7 +120,7 @@
             <link rel="import" href="packages/a/foo.html">
           </head>
           <body>
-            <script type="application/dart" src="index.html.1.bootstrap.dart"></script>
+            <script type="application/dart" src="index.bootstrap.dart"></script>
           </body>
         </html>''',
     'a|web/index.html.1.dart': '''
@@ -130,8 +130,8 @@
         library a.foo;
 
         import 'package:a/bar.dart';''',
-    'a|web/index.html.1.bootstrap.dart': '''
-        library a.web.index_html_1_bootstrap_dart;
+    'a|web/index.bootstrap.dart': '''
+        library a.web.index_bootstrap_dart;
 
         import 'index.html.0.dart' as i0;
         import 'index.html.1.dart' as i1;
@@ -190,14 +190,14 @@
   }, {
     'a|web/test.html': '''
         <!DOCTYPE html><html><head>
-          <script type="application/dart" src="test.html.0.bootstrap.dart">
+          <script type="application/dart" src="test.bootstrap.dart">
           </script>
         </head><body></body></html>''',
     'a|web/test.html.0.dart': '''
         library a.web.test_html_0;
         main() { }''',
-    'a|web/test.html.0.bootstrap.dart': '''
-        library a.web.test_html_0_bootstrap_dart;
+    'a|web/test.bootstrap.dart': '''
+        library a.web.test_bootstrap_dart;
 
         import 'test.html.0.dart' as i0;
 
@@ -214,14 +214,14 @@
   }, {
     'a|web/test.html': '''
         <!DOCTYPE html><html><head>
-          <script type="application/dart" src="test.html.0.bootstrap.dart">
+          <script type="application/dart" src="test.bootstrap.dart">
           </script>
         </head><body></body></html>''',
     'a|web/test.html.0.dart': '''
         library f;
         main() { }''',
-    'a|web/test.html.0.bootstrap.dart': '''
-        library a.web.test_html_0_bootstrap_dart;
+    'a|web/test.bootstrap.dart': '''
+        library a.web.test_bootstrap_dart;
 
         import 'test.html.0.dart' as i0;
 
@@ -336,7 +336,7 @@
         part 'test2/baz.dart';''',
     'a|web/test2/foo.html': '''
         <!DOCTYPE html><html><head></head><body>
-          <script type="application/dart" src="foo.html.0.bootstrap.dart">
+          <script type="application/dart" src="foo.bootstrap.dart">
           </script>
         </body></html>''',
     'a|web/test2/foo.html.0.dart': '''