| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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 library dev_compiler.src.codegen.html_codegen; | |
| 6 | |
| 7 import 'package:html/dom.dart'; | 5 import 'package:html/dom.dart'; |
| 8 import 'package:html/parser.dart' show parseFragment; | 6 import 'package:html/parser.dart' show parseFragment; |
| 9 import 'package:logging/logging.dart' show Logger; | 7 import 'package:logging/logging.dart' show Logger; |
| 10 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
| 11 | 9 |
| 12 import '../compiler.dart' show AbstractCompiler; | 10 import '../compiler.dart' show AbstractCompiler; |
| 13 import '../server/dependency_graph.dart'; | 11 import '../server/dependency_graph.dart'; |
| 14 import '../utils.dart' show colorOf, resourceOutputPath; | 12 import '../utils.dart' show colorOf, resourceOutputPath; |
| 15 | 13 |
| 16 /// Emits an entry point HTML file corresponding to [inputFile] that can load | 14 /// Emits an entry point HTML file corresponding to [inputFile] that can load |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 124 |
| 127 /// Convert the outputPath to include the hash in it. This function is the | 125 /// Convert the outputPath to include the hash in it. This function is the |
| 128 /// reverse of what the server does to determine whether a request needs to have | 126 /// reverse of what the server does to determine whether a request needs to have |
| 129 /// cache headers added to it. | 127 /// cache headers added to it. |
| 130 _addHash(String outPath, String hash) { | 128 _addHash(String outPath, String hash) { |
| 131 // (the ____ prefix makes it look better in the web inspector) | 129 // (the ____ prefix makes it look better in the web inspector) |
| 132 return '$outPath?____cached=$hash'; | 130 return '$outPath?____cached=$hash'; |
| 133 } | 131 } |
| 134 | 132 |
| 135 final _log = new Logger('dev_compiler.src.codegen.html_codegen'); | 133 final _log = new Logger('dev_compiler.src.codegen.html_codegen'); |
| OLD | NEW |