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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/dart2js.dart

Issue 23721012: Generate out.precompiled.js, not precompiled.js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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
Index: dart/sdk/lib/_internal/compiler/implementation/dart2js.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart b/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart
index 68f7358bf50dd9e1bf687ce7011caa444f574540..989ae34d059074f74e6b935d71c0d808be48ba7a 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -313,7 +313,7 @@ Future compile(List<String> argv) {
if (!explicitOut) {
String input = uriPathToNative(arguments[0]);
String output = relativize(currentDirectory, out, isWindows);
- print('Dart file $input compiled to $outputLanguage: $output');
+ print('Dart file ($input) compiled to $outputLanguage: $output');
ahe 2013/09/23 17:13:42 Since I'm touching this, I figured I could fix htt
}
}
@@ -327,6 +327,17 @@ Future compile(List<String> argv) {
uri = out;
sourceMapFileName =
sourceMapOut.path.substring(sourceMapOut.path.lastIndexOf('/') + 1);
+ } else if (extension == 'precompiled.js') {
+ String outPath = out.path;
+ if (outPath.endsWith('.js')) {
+ outPath = outPath.substring(0, outPath.length - 3);
+ uri = out.resolve('$outPath.$extension');
+ } else {
+ uri = out.resolve(extension);
+ }
+ diagnosticHandler.info(
+ "File ($uri) is compatible with header"
+ " \"Content-Security-Policy: script-src 'self'\"");
} else if (extension == 'js.map' || extension == 'dart.map') {
uri = sourceMapOut;
} else {

Powered by Google App Engine
This is Rietveld 408576698