Commit 36433952 authored by Devon Carew's avatar Devon Carew

Merge pull request #1456 from devoncarew/create_output

make the output from create more terse
parents 5ff2b1a1 a4b0c3d5
...@@ -52,7 +52,8 @@ class CreateCommand extends Command { ...@@ -52,7 +52,8 @@ class CreateCommand extends Command {
printStatus(''); printStatus('');
String message = '''All done! To run your application: String message = '''
All done! To run your application:
\$ cd ${out.path} \$ cd ${out.path}
\$ flutter start \$ flutter start
...@@ -64,14 +65,14 @@ class CreateCommand extends Command { ...@@ -64,14 +65,14 @@ class CreateCommand extends Command {
return code; return code;
} }
printStatus('');
printStatus(message); printStatus(message);
return 0; return 0;
} }
Future<int> pubGet({ Future<int> pubGet({
String directory: '', String directory: '',
bool skipIfAbsent: false, bool skipIfAbsent: false
bool verbose: true
}) async { }) async {
File pubSpecYaml = new File(path.join(directory, 'pubspec.yaml')); File pubSpecYaml = new File(path.join(directory, 'pubspec.yaml'));
File pubSpecLock = new File(path.join(directory, 'pubspec.lock')); File pubSpecLock = new File(path.join(directory, 'pubspec.lock'));
...@@ -85,10 +86,9 @@ class CreateCommand extends Command { ...@@ -85,10 +86,9 @@ class CreateCommand extends Command {
} }
if (!pubSpecLock.existsSync() || pubSpecYaml.lastModifiedSync().isAfter(pubSpecLock.lastModifiedSync())) { if (!pubSpecLock.existsSync() || pubSpecYaml.lastModifiedSync().isAfter(pubSpecLock.lastModifiedSync())) {
if (verbose) printStatus("Running 'pub get' in '$directory'...");
printStatus("Running pub get in $directory...");
int code = await runCommandAndStreamOutput( int code = await runCommandAndStreamOutput(
[sdkBinaryName('pub'), 'get'], <String>[sdkBinaryName('pub'), '--verbosity=warning', 'get'],
workingDirectory: directory workingDirectory: directory
); );
if (code != 0) if (code != 0)
...@@ -131,7 +131,7 @@ abstract class Template { ...@@ -131,7 +131,7 @@ abstract class Template {
File file = new File(path.join(dir.path, filePath)); File file = new File(path.join(dir.path, filePath));
file.parent.createSync(); file.parent.createSync();
file.writeAsStringSync(contents); file.writeAsStringSync(contents);
printStatus(file.path); printStatus(' ${file.path}');
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment