File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public function getDescription():string {
1919 /** @return NamedParameter[] */
2020 public function getRequiredNamedParameterList ():array {
2121 return [
22- "name "
22+ new NamedParameter ( "name " )
2323 ];
2424 }
2525
@@ -66,7 +66,11 @@ public function run(ArgumentValueList $arguments = null):void {
6666 $ this ->writeLine (
6767 "Using blueprint: $ blueprint "
6868 );
69+
6970 exec ("composer create-project --remove-vcs webengine-blueprints/ $ blueprint:dev-master $ appDir " );
71+
72+ $ this ->writeLine ();
73+ $ this ->writeLine ("Installation complete. Have fun! https://www.php.gt/documentation " );
7074// TODO: Future release of php.gt/config:
7175// Use config-generate to set the correct namespace.
7276// Update project's composer.json to autoload the correct application classes (from namespace).
Original file line number Diff line number Diff line change 66use Gt \Cli \Command \Command ;
77use Gt \Cli \Parameter \NamedParameter ;
88use Gt \Cli \Parameter \Parameter ;
9+ use Gt \Cli \Process \Process ;
910use Gt \Cli \Stream ;
1011
1112class ServeCommand extends Command {
@@ -47,7 +48,7 @@ public function run(ArgumentValueList $arguments = null):void {
4748 $ gtServeCommand = implode (DIRECTORY_SEPARATOR , [
4849 "vendor " ,
4950 "bin " ,
50- "gt- serve " ,
51+ "serve " ,
5152 ]);
5253
5354 if (!file_exists ($ gtServeCommand )) {
@@ -59,10 +60,16 @@ public function run(ArgumentValueList $arguments = null):void {
5960 }
6061
6162 $ cmd = implode (" " , [
62- $ gtServeCommand ,
63- "--port " . $ arguments ->get ("port " , 8080 )
63+ // $gtServeCommand,
64+ "echo one && sleep 1 && echo two && sleep 1 && echo three "
65+ // "--port " . $arguments->get("port", 8080)
6466 ]);
6567
66- passthru ($ cmd );
68+ $ process = new Process ($ cmd );
69+ $ process ->exec ();
70+
71+ while ($ process ->isAlive ()) {
72+ echo $ process ->read ();
73+ }
6774 }
6875}
You can’t perform that action at this time.
0 commit comments