move the analysis_options to a file

This commit is contained in:
Devon Carew
2016-03-10 13:47:20 -08:00
parent 5fcaebbf51
commit 780e4e6212
7 changed files with 45 additions and 45 deletions

View File

@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:convert';
import 'dart:io';
@@ -14,14 +15,14 @@ Process daemon;
// stopAll: stop any running app
// devices: list devices
main() async {
Future main() async {
daemon = await Process.start('flutter', ['daemon']);
print('daemon process started, pid: ${daemon.pid}');
daemon.stdout
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) => print('<== ${line}'));
.listen((String line) => print('<== $line'));
daemon.stderr.listen((data) => stderr.add(data));
stdout.write('> ');
@@ -37,13 +38,13 @@ main() async {
} else if (line == 'devices') {
_send({'method': 'device.getDevices'});
} else {
print('command not understood: ${line}');
print('command not understood: $line');
}
stdout.write('> ');
});
daemon.exitCode.then((int code) {
print('daemon exiting (${code})');
print('daemon exiting ($code)');
exit(code);
});
}
@@ -54,5 +55,5 @@ void _send(Map map) {
map['id'] = id++;
String str = '[${JSON.encode(map)}]';
daemon.stdin.writeln(str);
print('==> ${str}');
print('==> $str');
}