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

Unified Diff: lib/src/codegen/html_codegen.dart

Issue 1007313003: Move sunflower to a new directory, make final tweaks to make it all work. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months 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 | « lib/runtime/dart_runtime.js ('k') | test/codegen/dom.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/html_codegen.dart
diff --git a/lib/src/codegen/html_codegen.dart b/lib/src/codegen/html_codegen.dart
index ff1e730eab56d3d41ba417ea5f708a3210f101a2..49dbc4148085dbcddb4abed1e19ace25db894135 100644
--- a/lib/src/codegen/html_codegen.dart
+++ b/lib/src/codegen/html_codegen.dart
@@ -56,13 +56,13 @@ String generateEntryHtml(HtmlSourceNode root, CompilerOptions options) {
if (resource.cachingHash != null) {
resourcePath = _addHash(resourcePath, resource.cachingHash);
}
- if (path.extension(resourcePath) == '.css') {
+ var ext = path.extension(resourcePath);
+ if (ext == '.css') {
fragment.nodes.add(_cssInclude(resourcePath));
- } else {
+ } else if (ext == '.js') {
fragment.nodes.add(_libraryInclude(resourcePath));
}
}
- if (!options.checkSdk) fragment.nodes.add(_miniMockSdk);
for (var lib in libraries) {
var info = lib.info;
if (info == null) continue;
@@ -101,13 +101,4 @@ _addHash(String outPath, String hash) {
return path.join('cached', hash, outPath);
}
-/// A script tag with a tiny mock of the core SDK. This is just used for testing
-/// some small samples.
-// TODO(sigmund,jmesserly): remove.
-Node get _miniMockSdk => parseFragment('''
-<script>
- /* placehorder for unimplemented code libraries */
- var math = Math;
- var core = { int: { parse: Number }, print: e => console.log(e) };
-</script>''');
final _log = new Logger('dev_compiler.src.codegen.html_codegen');
« no previous file with comments | « lib/runtime/dart_runtime.js ('k') | test/codegen/dom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698