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

Unified Diff: lib/src/compiler/command.dart

Issue 2197243002: Rename build-root to library-root (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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/src/compiler/code_generator.dart ('k') | lib/src/compiler/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/command.dart
diff --git a/lib/src/compiler/command.dart b/lib/src/compiler/command.dart
index cd498b7f31761a74beba96858697111a1c4c2e16..a1268c55d3097341c7e08423caa42627896b123d 100644
--- a/lib/src/compiler/command.dart
+++ b/lib/src/compiler/command.dart
@@ -26,9 +26,11 @@ class CompileCommand extends Command {
argParser.addOption('module-root',
help: 'Root module directory. '
'Generated module paths are relative to this root.');
- argParser.addOption('build-root',
+ argParser.addOption('library-root',
help: 'Root of source files. '
'Generated library names are relative to this root.');
+ argParser.addOption('build-root',
+ help: 'Deprecated in favor of --library-root');
CompilerOptions.addArguments(argParser);
AnalyzerOptions.addArguments(argParser);
}
@@ -48,11 +50,12 @@ class CompileCommand extends Command {
' -o PATH/TO/OUTPUT_FILE.js');
}
- var buildRoot = argResults['build-root'] as String;
- if (buildRoot != null) {
- buildRoot = path.absolute(buildRoot);
+ var libraryRoot = argResults['library-root'] as String;
+ libraryRoot ??= argResults['build-root'] as String;
+ if (libraryRoot != null) {
+ libraryRoot = path.absolute(libraryRoot);
} else {
- buildRoot = Directory.current.path;
+ libraryRoot = Directory.current.path;
}
var moduleRoot = argResults['module-root'] as String;
String modulePath;
@@ -73,7 +76,7 @@ class CompileCommand extends Command {
usageException('Please pass at least one source file as an argument.');
}
- var unit = new BuildUnit(modulePath, buildRoot, argResults.rest,
+ var unit = new BuildUnit(modulePath, libraryRoot, argResults.rest,
(source) => _moduleForLibrary(moduleRoot, source));
JSModuleFile module = compiler.compile(unit, _compilerOptions);
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | lib/src/compiler/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698