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

Unified Diff: lib/src/options.dart

Issue 1633003002: Add --modules=node support (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged master Created 4 years, 11 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.dart ('k') | test/browser/runtime_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/options.dart
diff --git a/lib/src/options.dart b/lib/src/options.dart
index d5abf8d2023e6db63fc36eec8164900eeaeef781..2d132a48b46eaa57fe19886edcd6d1c400379d60 100644
--- a/lib/src/options.dart
+++ b/lib/src/options.dart
@@ -58,7 +58,7 @@ class SourceResolverOptions {
this.useImplicitHtml: false});
}
-enum ModuleFormat { es6, legacy }
+enum ModuleFormat { es6, legacy, node }
ModuleFormat parseModuleFormat(String s) => parseEnum(s, ModuleFormat.values);
// TODO(jmesserly): refactor all codegen options here.
@@ -315,7 +315,9 @@ final ArgParser argParser = new ArgParser()
allowedHelp: {
getEnumName(ModuleFormat.es6): 'es6 modules',
getEnumName(ModuleFormat.legacy):
- 'a custom format used by dartdevc, similar to AMD'
+ 'a custom format used by dartdevc, similar to AMD',
+ getEnumName(ModuleFormat.node):
+ 'node.js modules (https://nodejs.org/api/modules.html)'
},
defaultsTo: getEnumName(ModuleFormat.legacy))
« no previous file with comments | « lib/src/compiler.dart ('k') | test/browser/runtime_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698