File tree Expand file tree Collapse file tree 6 files changed +19
-5
lines changed Expand file tree Collapse file tree 6 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public function publish(Input $input): int
7676 $ assetDir = alias ($ assetDir );
7777 $ targetDir = alias ($ targetDir );
7878
79- $ force = \ input() ->sameOpt (['f ' , 'force ' ], false );
79+ $ force = $ input ->sameOpt (['f ' , 'force ' ], false );
8080
8181 if ($ force && is_dir ($ targetDir )) {
8282 output ()->writeln ("Will delete the old assets: $ targetDir " );
@@ -91,7 +91,7 @@ public function publish(Input $input): int
9191 }
9292 }
9393
94- $ yes = \ input() ->sameOpt (['y ' , 'yes ' ], false );
94+ $ yes = $ input ->sameOpt (['y ' , 'yes ' ], false );
9595 $ command = "cp -Rf $ assetDir $ targetDir " ;
9696
9797 output ()->writeln ("Will run shell command: \n $ command " );
Original file line number Diff line number Diff line change 33namespace Swoft \Cli \Command ;
44
55use Swoft ;
6- use Swoft \Cli \Bean \ModifyWatcher ;
6+ use Swoft \Cli \Common \ModifyWatcher ;
77use Swoft \Cli \Helper \CliHelper ;
88use Swoft \Console \Annotation \Mapping \Command ;
99use Swoft \Console \Annotation \Mapping \CommandArgument ;
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Cli \Bean ;
3+ namespace Swoft \Cli \Common ;
44
55use RuntimeException ;
66use Swoft \Stdlib \Helper \Sys ;
Original file line number Diff line number Diff line change @@ -13,16 +13,25 @@ class CliHelper
1313{
1414 public const PREFIX = ' <cyan>[SWOFTCLI]</cyan> ' ;
1515
16+ /**
17+ * @param string $msg
18+ */
1619 public static function info (string $ msg ): void
1720 {
1821 Show::writeln (date ('Y/m/d-H:i:s ' ) . self ::PREFIX . " <info> $ msg</info> " );
1922 }
2023
24+ /**
25+ * @param string $msg
26+ */
2127 public static function warn (string $ msg ): void
2228 {
2329 Show::writeln (date ('Y/m/d-H:i:s ' ) . self ::PREFIX . " <warning> $ msg</warning> " );
2430 }
2531
32+ /**
33+ * @param string $msg
34+ */
2635 public static function error (string $ msg ): void
2736 {
2837 Show::writeln (date ('Y/m/d-H:i:s ' ) . self ::PREFIX . " <error> $ msg</error> " );
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ protected function afterInit(): void
3131 public function getCLoggerConfig (): array
3232 {
3333 $ config = parent ::getCLoggerConfig ();
34- // disable print console start log
34+ // disable print console log
3535 $ config ['enable ' ] = false ;
3636
3737 return $ config ;
Original file line number Diff line number Diff line change 44// use Swoft\Server\Swoole\SwooleEvent;
55
66return [
7+ 'cliApp ' => [
8+ 'name ' => 'Swoft-cli ' ,
9+ 'version ' => '0.1.2 ' ,
10+ 'description ' => 'CLI tool application for quick use swoft framework ' ,
11+ ],
712 'cliRouter ' => [
813 'idAliases ' => [
914 // 'run' => 'serve:run'
You can’t perform that action at this time.
0 commit comments