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 /** Transfomer that combines multiple dart script tags into a single one. */ | 5 /** Transfomer that combines multiple dart script tags into a single one. */ |
6 library polymer.src.build.script_compactor; | 6 library polymer.src.build.script_compactor; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:convert'; | 9 import 'dart:convert'; |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 ..writeln(' ]);') | 97 ..writeln(' ]);') |
98 ..writeln(' i${i - 1}.main();') | 98 ..writeln(' i${i - 1}.main();') |
99 ..writeln('}'); | 99 ..writeln('}'); |
100 | 100 |
101 transform.addOutput(new Asset.fromString( | 101 transform.addOutput(new Asset.fromString( |
102 bootstrapId, buffer.toString())); | 102 bootstrapId, buffer.toString())); |
103 transform.addOutput(new Asset.fromString(id, document.outerHtml)); | 103 transform.addOutput(new Asset.fromString(id, document.outerHtml)); |
104 }); | 104 }); |
105 }); | 105 }); |
106 } | 106 } |
| 107 |
| 108 String toString() => 'polymer-script-compactor'; |
107 } | 109 } |
108 | 110 |
109 const MAIN_HEADER = """ | 111 const MAIN_HEADER = """ |
110 library app_bootstrap; | 112 library app_bootstrap; |
111 | 113 |
112 import 'package:polymer/polymer.dart'; | 114 import 'package:polymer/polymer.dart'; |
113 """; | 115 """; |
OLD | NEW |