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

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: reverted let->const parasite change 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
Index: lib/src/options.dart
diff --git a/lib/src/options.dart b/lib/src/options.dart
index d5abf8d2023e6db63fc36eec8164900eeaeef781..8905c630d2509b0ca432f711c57ef5e655129a5e 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,8 @@ 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'
Jennifer Messerly 2016/01/29 00:32:32 https://nodejs.org/api/modules.html is a good lin
ochafik 2016/01/29 09:38:17 Thanks!
},
defaultsTo: getEnumName(ModuleFormat.legacy))

Powered by Google App Engine
This is Rietveld 408576698