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

Unified Diff: lib/devc.dart

Issue 968273002: Fixing layout in js output (use full paths rather than just the library name) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: address review comments Created 5 years, 10 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 | « no previous file | lib/src/codegen/html_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/devc.dart
diff --git a/lib/devc.dart b/lib/devc.dart
index 8670131c96c11b05bd1e456ed81b8397c3464382..6c28d6412a562de061b1d15bd4581c5f7afc4d67 100644
--- a/lib/devc.dart
+++ b/lib/devc.dart
@@ -80,7 +80,8 @@ CheckerResults _compileHtml(
return _earlyErrorResult;
}
- var results = _compileDart(dartInputFile, resolver, options, reporter);
+ var results = _compileDart(dartInputFile, resolver, options, reporter,
+ new Uri.file(path.absolute(inputFile)));
if (results.failure && !options.forceCompile) return results;
if (options.outputDir != null) {
@@ -91,14 +92,14 @@ CheckerResults _compileHtml(
CheckerResults _compileDart(
String inputFile, TypeResolver resolver, CompilerOptions options,
- [CheckerReporter reporter]) {
+ [CheckerReporter reporter, Uri htmlUri]) {
Uri uri;
if (inputFile.startsWith('dart:') || inputFile.startsWith('package:')) {
uri = Uri.parse(inputFile);
} else {
uri = new Uri.file(path.absolute(inputFile));
}
-
+ var codegenRoot = htmlUri != null ? htmlUri : uri;
if (reporter == null) {
reporter = options.dumpInfo
? new SummaryReporter()
@@ -111,14 +112,14 @@ CheckerResults _compileDart(
var codeChecker = new CodeChecker(rules, reporter, options);
var generators = <CodeGenerator>[];
if (options.dumpSrcDir != null) {
- generators
- .add(new EmptyDartGenerator(options.dumpSrcDir, uri, rules, options));
+ generators.add(new EmptyDartGenerator(
+ options.dumpSrcDir, codegenRoot, rules, options));
}
var outputDir = options.outputDir;
if (outputDir != null) {
var cg = options.outputDart
- ? new DartGenerator(outputDir, uri, rules, options)
- : new JSGenerator(outputDir, uri, rules, options);
+ ? new DartGenerator(outputDir, codegenRoot, rules, options)
+ : new JSGenerator(outputDir, codegenRoot, rules, options);
generators.add(cg);
}
« no previous file with comments | « no previous file | lib/src/codegen/html_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698