Skip to content

Commit fed37d3

Browse files
committed
Merge branch 'v2'
2 parents de71166 + d82f019 commit fed37d3

39 files changed

+1318
-579
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ pineal
66
.vscode
77
logo-square.pxm
88
.DS_Store
9-
config.json
9+
config.json

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,29 @@
22

33
![MTRGen Logo](docs/assets/images/logo.png)
44

5-
#### [Official Website](https://mtrgen.com)
5+
*Generate files from templates with ease.*
66

7-
#### [Documentation](https://mtrgen.com/docs)
7+
[![Latest Stable Version](https://poser.pugx.org/matronator/mtrgen/v)](https://packagist.org/packages/matronator/mtrgen)
8+
[![Total Downloads](https://poser.pugx.org/matronator/mtrgen/downloads)](https://packagist.org/packages/matronator/mtrgen)
9+
[![License](https://poser.pugx.org/matronator/mtrgen/license)](https://packagist.org/packages/matronator/mtrgen)
810

9-
File generator engine that can generate PHP files from JSON/YAML/NEON templates.
11+
#### [Official Website](https://mtrgen.com) | [Documentation](https://mtrgen.com/docs) | [Template Repository](https://mtrgen.com/repository)
12+
13+
File generator for source code files.
14+
15+
MTRGen is a CLI tool that can be used in any project and generate files in any language. Create your own templates or use templates from the [online repository](https://www.mtrgen.com/repository). MTRGen is a great tool for generating boilerplate code, but it can also be used to generate any other type of file.
1016

1117
## Requirements
1218

13-
- PHP >= 7.4
19+
- PHP >= 8.1
1420
- Composer
1521

1622
## Instalation
1723

1824
Install with Composer:
1925

2026
```
21-
composer require matronator/mtrgen --dev
27+
composer require matronator/mtrgen
2228
```
2329

2430
#### Troubleshooting
@@ -39,13 +45,13 @@ If you can't or don't want to update composer, use version `"^1.0"` of this pack
3945

4046
## Documentation
4147

42-
[Read the full documentation here.](https://matronator.github.io/MTRGen/)
48+
[Read the full documentation here](https://www.mtrgen.com/docs/) *- needs to be updated to version 2!*
4349

4450
## Quickstart
4551

46-
You run the script from terminal using this command:
52+
Here are some examples of commands you can run with MTRGen:
4753

48-
```
54+
```bash
4955
# To list all available commands
5056
vendor/bin/mtrgen list
5157

@@ -60,21 +66,29 @@ vendor/bin/mtrgen gen -p my/folder/template.json
6066
# Generate from the global store
6167
vendor/bin/mtrgen generate TemplateName
6268

69+
# Download template from the online repository and save it to the global store
70+
vendor/bin/mtrgen add vendor/template
71+
vendor/bin/mtrgen a vendor/template
72+
6373
# Save a template to the global store
6474
vendor/bin/mtrgen save path/to/template.json
6575
vendor/bin/mtrgen s path/to/template.json
6676

6777
# Optionally provide an alias to save the template under
6878
vendor/bin/mtrgen save path/to/template.json --alias=NewName
6979

80+
# Save a bundle to the global store
81+
vendor/bin/mtrgen save-bundle BundleName path/to/template1.json path/to/template2.json
82+
vendor/bin/mtrgen sb BundleName path/to/template1.json path/to/template2.json
83+
7084
# Remove a template from the global store
7185
vendor/bin/mtrgen remove TemplateName
72-
vendor/bin/mtrgen r TemplateName
73-
```
86+
vendor/bin/mtrgen rm TemplateName
7487

75-
## Acknowledgement
76-
77-
This project would not be possible without [Nette](https://nette.org)'s [`php-generator`](https://github.com/nette/php-generator) package, which is used for the final code generation itself to output the finished PHP file.
88+
# Repair the global store (remove all templates that don't exist)
89+
vendor/bin/mtrgen repair
90+
vendor/bin/mtrgen r
91+
```
7892

7993
## License
8094

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"require": {
3131
"php": ">=8.1",
32-
"nette/php-generator": "^4.0",
32+
"nette/php-generator": "^3.0 || ^4.0",
3333
"symfony/console": "^6.2",
3434
"nette/neon": "^3.3",
3535
"nette/safe-stream": "^3.0",
@@ -44,7 +44,7 @@
4444
"prefer-stable": true,
4545
"config": {
4646
"platform": {
47-
"php": "8.1"
47+
"php": "8.2"
4848
}
4949
},
5050
"funding": [

0 commit comments

Comments
 (0)