Chromium Code Reviews| Index: sdk/lib/_internal/pub/lib/src/command/serve.dart |
| diff --git a/sdk/lib/_internal/pub/lib/src/command/serve.dart b/sdk/lib/_internal/pub/lib/src/command/serve.dart |
| index d3df35a2563f8e81aa1c8b9814d54db966261022..916696ef7f1054b185d28bd78f9bd2964039c4fa 100644 |
| --- a/sdk/lib/_internal/pub/lib/src/command/serve.dart |
| +++ b/sdk/lib/_internal/pub/lib/src/command/serve.dart |
| @@ -53,6 +53,9 @@ class ServeCommand extends PubCommand { |
| commandParser.addFlag('minify', defaultsTo: false, |
| help: 'Minify generated JavaScript.'); |
| + |
| + commandParser.addFlag('force-poll', defaultsTo: false, |
| + help: 'Force the use of a polling filesystem watcher.'); |
|
Bob Nystrom
2013/11/08 01:32:32
How about just "--poll"? It's not really "forcing"
nweiz
2013/11/08 01:44:24
That was how I had it originally, but it seemed we
|
| } |
| Future onRun() { |
| @@ -77,9 +80,12 @@ class ServeCommand extends PubCommand { |
| ]; |
| } |
| + var watcherType = commandOptions['force-poll'] ? |
| + barback.WatcherType.POLLING : barback.WatcherType.AUTO; |
| // TODO(rnystrom): Allow specifying other modes. |
| return barback.createServer(hostname, port, graph, BarbackMode.DEBUG, |
| - builtInTransformers: builtInTransformers); |
| + builtInTransformers: builtInTransformers, |
| + watcher: watcherType); |
| }).then((server) { |
| /// This completer is used to keep pub running (by not completing) and |
| /// to pipe fatal errors to pub's top-level error-handling machinery. |