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

Unified Diff: lib/src/options.dart

Issue 1152573003: Fixes #196 - Enable resources to be served (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Reformat Created 5 years, 7 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/dependency_graph.dart ('k') | no next file » | 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 6861a9030c6f91e286f4ed50d650e4a6c5fc78be..7591a881de8934b804956d1e468f86d7b8838b5c 100644
--- a/lib/src/options.dart
+++ b/lib/src/options.dart
@@ -26,6 +26,9 @@ class ResolverOptions {
/// List of paths used for the multi-package resolver.
final List<String> packagePaths;
+ /// List of additional non-Dart resources to resolve and serve.
+ final List<String> resources;
+
/// Whether to infer return types and field types from overriden members.
final bool inferFromOverrides;
static const inferFromOverridesDefault = true;
@@ -60,7 +63,7 @@ class ResolverOptions {
static const String implicitHtmlFile = 'index.html';
ResolverOptions({this.useMultiPackage: false, this.packageRoot: 'packages/',
- this.packagePaths: const <String>[],
+ this.packagePaths: const <String>[], this.resources: const <String>[],
this.inferFromOverrides: inferFromOverridesDefault,
this.inferTransitively: inferTransitivelyDefault,
this.onlyInferConstsAndFinalFields: onlyInferConstAndFinalFieldsDefault,
@@ -192,6 +195,10 @@ class CompilerOptions implements RulesOptions, ResolverOptions, JSCodeOptions {
@override
final List<String> packagePaths;
+ /// List of additional non-Dart resources to resolve and serve.
+ @override
+ final List<String> resources;
+
/// Whether to infer types downwards from local context
@override
final bool inferDownwards;
@@ -239,7 +246,7 @@ class CompilerOptions implements RulesOptions, ResolverOptions, JSCodeOptions {
this.outputDart: false, this.useColors: true,
this.covariantGenerics: true, this.relaxedCasts: true,
this.useMultiPackage: false, this.packageRoot: 'packages/',
- this.packagePaths: const <String>[],
+ this.packagePaths: const <String>[], this.resources: const <String>[],
this.inferDownwards: RulesOptions.inferDownwardsDefault,
this.inferFromOverrides: ResolverOptions.inferFromOverridesDefault,
this.inferTransitively: ResolverOptions.inferTransitivelyDefault,
@@ -304,6 +311,7 @@ CompilerOptions parseOptions(List<String> argv) {
useMultiPackage: args['use-multi-package'],
packageRoot: args['package-root'],
packagePaths: args['package-paths'].split(','),
+ resources: args['resources'].split(','),
inferDownwards: args['infer-downwards'],
inferFromOverrides: args['infer-from-overrides'],
inferTransitively: args['infer-transitively'],
@@ -377,6 +385,8 @@ final ArgParser argParser = new ArgParser()
..addOption('package-paths',
help: 'if using the multi-package resolver, the list of directories to\n'
'look for packages in.', defaultsTo: '')
+ ..addOption('resources',
+ help: 'Additional resources to serve', defaultsTo: '')
..addFlag('source-maps',
help: 'Whether to emit source map files', defaultsTo: true)
..addOption('runtime-dir',
« no previous file with comments | « lib/src/dependency_graph.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698