Skip to content

Commit 08f8c92

Browse files
committed
feat: add edent prettifier to component watch command
1 parent d266afc commit 08f8c92

7 files changed

Lines changed: 245 additions & 159 deletions

File tree

bin/ext-html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env php
22
<?php
3+
34
declare(strict_types=1);
45

56
use Html\Command\CreateClassCommand;
@@ -31,18 +32,18 @@ $app->command('make:all', function (InputInterface $input, OutputInterface $outp
3132
})->descriptions('Creates or re-creates all PHP classes for all HTML Elements and backed enums for static HTML attributes');
3233

3334
// generating Templates (.html,.twig,.php) for HTML elements
34-
$app->command('make:generate [generator] [source] [dest]', function (InputInterface $input, OutputInterface $output) {
35+
$app->command('generate [generator] [source] [dest]', function (InputInterface $input, OutputInterface $output) {
3536
$output->writeln('Generates templpates. Uses a given generator. Requires a source path with your component YAMLs and a destination path for the generated templates.');
3637
})->descriptions('Generates templates for HTML Elements');
3738

3839
$sourceDefault = realpath(__DIR__ . '/../examples/template-generator/source');
3940
$destDefault = realpath(__DIR__ . '/../examples/template-generator/dest');
4041
$app
41-
->command('make:watch [generator] [source] [dest] [--overwrite-existing=]', function ($generator, $source, $dest, $overwriteExisting = false, InputInterface $input, OutputInterface $output) {
42+
->command('watch [generator] [source] [dest] [--overwrite-existing=]', function ($generator, $source, $dest, $overwriteExisting = false, InputInterface $input, OutputInterface $output) {
4243
(new WatchCommand(new ComponentBuilder()))($generator, $source, $dest, $overwriteExisting, $input, $output);
4344
})
4445
->descriptions('Observes a directory or file for changes, and generates templates for HTML Elements', ['generator' => 'name of the generator', 'source' => 'source path', 'dest' => 'destination path'])
45-
->defaults(['generator' => 'html', 'source' =>$sourceDefault, 'dest' => $destDefault, 'overwrite-existing' => false]);
46+
->defaults(['generator' => 'html', 'source' => $sourceDefault, 'dest' => $destDefault, 'overwrite-existing' => false]);
4647

4748
// $app->setDefaultCommand('make:all');
4849
$app->run();

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"php": "^8.4",
4343
"revolt/event-loop": "^1.0.7",
4444
"mnapoli/silly": "^1.9.1",
45-
"symfony/yaml": "^7.3.1"
45+
"symfony/yaml": "^7.3.2"
4646
},
4747
"config": {
4848
"sort-packages": true,
@@ -61,14 +61,15 @@
6161
"require-dev": {
6262
"amphp/file": ">=3.2",
6363
"brainmaestro/composer-git-hooks": "dev-master",
64-
"friendsofphp/php-cs-fixer": "^3.84.0",
64+
"edent/pretty-print-html": "2025-04-18",
65+
"friendsofphp/php-cs-fixer": "^3.85.1",
6566
"pestphp/pest": "^3.8.2",
6667
"pestphp/pest-plugin-drift": "^3.0",
67-
"pestphp/pest-plugin-type-coverage": "^3.6",
68+
"pestphp/pest-plugin-type-coverage": "^3.6.1",
6869
"phpmd/phpmd": "^2.15",
69-
"phpstan/phpstan": "^2.1.18",
70-
"rector/swiss-knife": "^2.3.1",
71-
"symplify/easy-coding-standard": "^12.5.20"
70+
"phpstan/phpstan": "^2.1.21",
71+
"rector/swiss-knife": "^2.3.2",
72+
"symplify/easy-coding-standard": "^12.5.22"
7273
},
7374
"extra": {
7475
"hooks": {

0 commit comments

Comments
 (0)