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

Unified Diff: dart/frog/leg/dart2js.dart

Issue 9866006: Add library mapping. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
Index: dart/frog/leg/dart2js.dart
diff --git a/dart/frog/leg/dart2js.dart b/dart/frog/leg/dart2js.dart
index 2481feae790334dad8562d119cf708bd9af78c93..b77e81753cfc927b0ef68d3d378124e55c43c33c 100644
--- a/dart/frog/leg/dart2js.dart
+++ b/dart/frog/leg/dart2js.dart
@@ -9,7 +9,6 @@
#import('../../lib/uri/uri.dart');
#import('../../frog/leg/api.dart', prefix: 'api');
-#import('../../frog/leg/io/io.dart', prefix: 'io');
#import('../../frog/leg/colors.dart');
#import('source_file.dart');
@@ -44,7 +43,7 @@ String relativize(Uri base, Uri uri) {
}
void compile(List<String> argv) {
- Uri cwd = new Uri(scheme: 'file', path: io.getCurrentDirectory());
+ Uri cwd = new Uri(scheme: 'file', path: getCurrentDirectory());
bool throwOnError = false;
bool showWarnings = true;
bool verbose = false;
@@ -151,3 +150,9 @@ String readAll(String filename) {
file.closeSync();
return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());
}
+
+String getCurrentDirectory() {
+ String dir = new File(".").fullPathSync();
+ if (dir.endsWith("/")) return dir;
+ return "$dir/";
+}

Powered by Google App Engine
This is Rietveld 408576698