Skip to content

Commit 10a0d63

Browse files
committed
feature: allow passing a custom html5 specification to create enum, create class, convert to json
1 parent ec42ac3 commit 10a0d63

139 files changed

Lines changed: 4089 additions & 354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bin/ext-html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ includeDependencyOrRepositoryVendorAutoloadIfExists($alreadyLoadedAutoloadFiles)
2121

2222
// generating PHP classes for HTML elements
2323
$app = new Silly\Application('Extended HTMLDocument', '0.2.0 (stable)');
24-
$app->command('make:classes [element]', function ($element, InputInterface $input, OutputInterface $output) {
24+
$app->command('make:classes [element] [--specification=]', function ($element, InputInterface $input, OutputInterface $output) {
2525
return (new CreateClassCommand())($element, $input, $output);
2626
})->descriptions('Creates a new PHP class for all or for a given HTML Element');
27-
$app->command('make:enums', new CreateEnumCommand())->descriptions('Creates backed enums for all HTML attributes with a static set of options');
28-
$app->command('make:json-specs', new CreateJsonCommand())->descriptions('Simply transforms the YAML specs into JSON');
29-
$app->command('make:all', function (InputInterface $input, OutputInterface $output) {
27+
$app->command('make:enums [--specification=]', new CreateEnumCommand())->descriptions('Creates backed enums for all HTML attributes with a static set of options');
28+
$app->command('make:json-specs [--specification=]', new CreateJsonCommand())->descriptions('Simply transforms the YAML specs into JSON');
29+
$app->command('make:all [--specification=]', function (InputInterface $input, OutputInterface $output) {
3030
(new CreateEnumCommand())($input, $output);
3131
(new CreateClassCommand())(null, $input, $output);
3232
})->descriptions('Creates or re-creates all PHP classes for all HTML Elements and backed enums for static HTML attributes');
3333

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

composer.json

Lines changed: 4 additions & 4 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.2"
45+
"symfony/yaml": "^7.3.3"
4646
},
4747
"config": {
4848
"sort-packages": true,
@@ -62,14 +62,14 @@
6262
"amphp/file": ">=3.2",
6363
"brainmaestro/composer-git-hooks": "dev-master",
6464
"edent/pretty-print-html": "2025-04-18",
65-
"friendsofphp/php-cs-fixer": "^3.86.0",
65+
"friendsofphp/php-cs-fixer": "^3.89.0",
6666
"pestphp/pest": "^3.8.4",
6767
"pestphp/pest-plugin-drift": "^3.0",
6868
"pestphp/pest-plugin-type-coverage": "^3.6.1",
6969
"phpmd/phpmd": "^2.15",
70-
"phpstan/phpstan": "^2.1.22",
70+
"phpstan/phpstan": "^2.1.31",
7171
"rector/swiss-knife": "^2.3.3",
72-
"symplify/easy-coding-standard": "^12.5.24"
72+
"symplify/easy-coding-standard": "^12.6.0"
7373
},
7474
"extra": {
7575
"hooks": {

0 commit comments

Comments
 (0)