Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/formewp/forme-codegen
The Forme cli tool - knocking WordPress into shape
https://github.com/formewp/forme-codegen
cli code-generation forme wordpress
Last synced: 4 days ago
JSON representation
The Forme cli tool - knocking WordPress into shape
- Host: GitHub
- URL: https://github.com/formewp/forme-codegen
- Owner: formewp
- License: mit
- Created: 2021-12-24T17:17:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T05:52:26.000Z (4 months ago)
- Last Synced: 2024-07-18T07:45:58.229Z (4 months ago)
- Topics: cli, code-generation, forme, wordpress
- Language: PHP
- Homepage: https://formewp.github.io
- Size: 590 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Forme CodeGen
Code Generation CLI For The Forme WordPress Framework.
Install it globally.
```sh
composer global require forme/codegen
```[Click here for Documentation](https://formewp.github.io)
## Development
For development run `phive install --force-accept-unsigned` followed by `composer install`.
Tools are in `./tools` rather than `./vendor/bin`
You also need [git cliff](https://github.com/orhun/git-cliff) for generating changelogs and [pcov](https://github.com/krakjoe/pcov) to generate coverage stats for infection to measure against.
The useful ones are set up as composer scripts.
```sh
composer test # run pest
composer stan # run phpstan on src
composer rector:check # rector dry run on src
composer rector:fix # rector on src
composer cs:check # php cs fixer dry run on src
composer cs:fix # php cs fixer on src
composer phar:build # build phar with box (experimental, some features don't work yet)
composer changelog # run git cliff
composer hooks # install git hooks (will run on composer install automatically)
composer bump:version # bump to the next patch version - can also take argument "minor" or "major"
composer infection # run infection on src
composer infection:log # run infection on src and log to infection.html
```### Output all help as markdown for docs
```bash
# requires findutils on OSX - you can drop the "g" xargs prefix on Linux
forme list --raw | cut -d' ' -f1 | gxargs -n1 -d'\n' forme --format=md help | sed $'s/\x1b\\[91m\([A-Za-z\\._-]*\)\x1b\\[0m/`\\1`/g' | sed $'s/ \x1b\\[0\;33m\(.*\)\x1b\\[0m/```bash\\n\\1\\n```/g' | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' > codegen.md
```Manual steps:
1. Check the section/command titles as this doesn't seem to output correct line breaks
2. Find and replace home folder
3. Copy into docs