| 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);
|
|
|