Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f1eaf8239 |
@@ -20,7 +20,7 @@ use Kiri\Crontab\CrontabProviders;
|
|||||||
use Kiri\Events\OnAfterCommandExecute;
|
use Kiri\Events\OnAfterCommandExecute;
|
||||||
use Kiri\Events\OnBeforeCommandExecute;
|
use Kiri\Events\OnBeforeCommandExecute;
|
||||||
use Kiri\Exception\NotFindClassException;
|
use Kiri\Exception\NotFindClassException;
|
||||||
use Kiri\FileListen\FileChangeCustomProcess;
|
use Kiri\FileListen\HotReload;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Server\ServerProviders;
|
use Server\ServerProviders;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
@@ -119,7 +119,7 @@ class Application extends BaseApplication
|
|||||||
$container = Kiri::getDi();
|
$container = Kiri::getDi();
|
||||||
|
|
||||||
$console = $container->get(ConsoleApplication::class);
|
$console = $container->get(ConsoleApplication::class);
|
||||||
$console->add($container->get(FileChangeCustomProcess::class));
|
$console->add($container->get(HotReload::class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ class Application extends BaseApplication
|
|||||||
private function enableFileChange(Command $class, $input, $output): void
|
private function enableFileChange(Command $class, $input, $output): void
|
||||||
{
|
{
|
||||||
fire(new OnBeforeCommandExecute());
|
fire(new OnBeforeCommandExecute());
|
||||||
if (!($class instanceof FileChangeCustomProcess)) {
|
if (!($class instanceof HotReload)) {
|
||||||
scan_directory(directory('app'), 'App');
|
scan_directory(directory('app'), 'App');
|
||||||
}
|
}
|
||||||
$class->run($input, $output);
|
$class->run($input, $output);
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class FileChangeCustomProcess extends Command
|
class HotReload extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -21,9 +21,9 @@ class Inotify
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $dirs
|
* @param array $dirs
|
||||||
* @param FileChangeCustomProcess $process
|
* @param HotReload $process
|
||||||
*/
|
*/
|
||||||
public function __construct(protected array $dirs, public FileChangeCustomProcess $process)
|
public function __construct(protected array $dirs, public HotReload $process)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ class Scaner
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $dirs
|
* @param array $dirs
|
||||||
* @param FileChangeCustomProcess $process
|
* @param HotReload $process
|
||||||
*/
|
*/
|
||||||
public function __construct(protected array $dirs, public FileChangeCustomProcess $process)
|
public function __construct(protected array $dirs, public HotReload $process)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user