-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Trusted97/chore/add-documentation
chore: add docs for command
- Loading branch information
Showing
10 changed files
with
347 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Docker Setup Command Documentation | ||
|
||
## Introduction | ||
|
||
The `docker:setup` command generates a basic Docker setup for a PHP library. It creates necessary directories and copies configuration files to enable Docker support for the library. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat docker:setup` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It is a self-contained setup process. | ||
|
||
## Command Execution | ||
|
||
To execute the `docker:setup` command, run the following: | ||
|
||
`vendor/bin/whitecat docker:setup` | ||
|
||
## Generated Docker Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks for the existence of the Docker directory. If it doesn't exist, it creates the directory. | ||
2. Copies PHP 8.1 configuration files from the Docker directory to the specified distribution directory. | ||
3. Copies the `docker-compose.yml` file to the specified distribution directory. | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenarios: | ||
|
||
* If the Docker directory already exists, the user can choose to continue and override it. | ||
* If the PHP 8.1 configuration already exists, the user can choose to override it. | ||
* If the `docker-compose.yml` file already exists, the user can choose to override it. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during directory or file creation, appropriate error messages are displayed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# GitHub Init Command Documentation | ||
|
||
## Introduction | ||
|
||
The `github:init` command generates a basic Github directory with starter files including `.editorconfig`, `.gitattributes`, `.gitignore`, and `README.md`. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat github:init` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It is a self-contained setup process. | ||
|
||
## Command Execution | ||
|
||
To execute the `github:init` command, run the following: | ||
|
||
`vendor/bin/whitecat github:init` | ||
|
||
Generated GitHub Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks for the existence of the GitHub directory. If it doesn't exist, it creates the directory. | ||
2. Copies `.editorconfig`, `.gitattributes`, `.gitignore`, and `README.md` files to the specified distribution directory. | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenarios: | ||
|
||
* If the GitHub directory already exists, the user can choose to continue and override it. | ||
* If any of the starter files already exist, the user can choose to override them. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during file or directory creation, appropriate error messages are displayed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# GitHub Issue Command Documentation | ||
|
||
## Introduction | ||
|
||
The `github:issue` command generates a basic template for GitHub issues, including bug reports and feature requests. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat github:issue` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It is a self-contained setup process. | ||
|
||
## Command Execution | ||
|
||
To execute the `github:issue` command, run the following: | ||
|
||
`vendor/bin/whitecat github:issue` | ||
|
||
## Generated GitHub Issue Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks for the existence of the GitHub issue directory. If it doesn't exist, it creates the directory. | ||
2. Copies `BUG-REPORT.yml`, `FEATURE-REQUEST.yml`, and `config.yml` files to the specified distribution directory. | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenarios: | ||
|
||
* If the GitHub issue directory already exists, the user can choose to continue and override it. | ||
* If any of the issue templates or the configuration file already exist, the user can choose to override them. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during file or directory creation, appropriate error messages are displayed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# GitHub Pull Command Documentation | ||
|
||
## Introduction | ||
|
||
The `github:pull` command generates basic templates for GitHub pull requests, including fix, improvement, and new feature templates. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat github:pull` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It is a self-contained setup process. | ||
|
||
## Command Execution | ||
|
||
To execute the `github:pull` command, run the following: | ||
|
||
`vendor/bin/whitecat github:pull` | ||
|
||
## Generated GitHub Pull Request Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks for the existence of the GitHub pull request directory. If it doesn't exist, it creates the directory. | ||
2. Copies `FIX.md`, `IMPROVEMENT.md`, and `NEW_FEATURE.md` files to the specified distribution directory. | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenarios: | ||
|
||
* If the GitHub pull request directory already exists, the user can choose to continue and override it. | ||
* If any of the pull request templates already exist, the user can choose to override them. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during file or directory creation, appropriate error messages are displayed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# GitHub Workflow Command Documentation | ||
|
||
## Introduction | ||
|
||
The `github:workflow` command generates basic GitHub workflow templates for various actions such as PHPUnit testing, deployment to Amazon ECS, deployment to Google Kubernetes Engine, and Terraform deployment. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat github:workflow` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It provides an interactive interface to choose the desired workflow actions. | ||
|
||
## Command Execution | ||
|
||
To execute the `github:workflow` command, run the following: | ||
|
||
`vendor/bin/whitecat github:workflow` | ||
|
||
## Generated GitHub Workflow Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks for the existence of the GitHub workflow directory. If it doesn't exist, it creates the directory. | ||
2. Allows the user to choose specific workflow actions or select "All" to generate all available workflows. | ||
3. Copies the selected workflow files to the specified distribution directory. | ||
|
||
## Available Workflow Options | ||
|
||
The user can choose from the following workflow options: | ||
|
||
* PHPUnit & Coverage (CodeCov) | ||
* Deploy to Amazon ECS | ||
* Deploy to Google Kubernetes Engine | ||
* Terraform Deploy | ||
* All | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenarios: | ||
|
||
* If the GitHub workflow directory already exists, the user can choose to continue and override it. | ||
* If any of the workflow templates already exist, the user can choose to override them. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during file or directory creation, appropriate error messages are displayed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# PHP CS Fixer Initialization Command Documentation | ||
|
||
## Introduction | ||
|
||
The `php-cs-fixer:init` command sets up basic configuration for PHP-CS-Fixer in a PHP library. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat php-cs-fixer:init` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It automatically detects the presence of PHP-CS-Fixer in the `require-dev` section of the `composer.json` file. | ||
|
||
## Command Execution | ||
|
||
To execute the `php-cs-fixer:init` command, run the following: | ||
|
||
`vendor/bin/whitecat php-cs-fixer:init` | ||
|
||
## Generated PHP-CS-Fixer Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks if PHP-CS-Fixer is installed as a development dependency. | ||
2. If PHP-CS-Fixer is not installed, it displays a warning message with instructions on how to install it using Composer. | ||
3. Copies the `.php-cs-fixer.dist.php` configuration file to the specified distribution directory. | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenario: | ||
|
||
* If the `.php-cs-fixer.dist.php` file already exists, the user can choose to override it. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during the validation or file copying process, appropriate error messages are displayed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# PHPStan Initialization Command Documentation | ||
|
||
## Introduction | ||
|
||
The `phpstan:init` command sets up basic configuration for PHPStan in a PHP library. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat phpstan:init` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It automatically detects the presence of PHPStan in the `require-dev` section of the `composer.json` file. | ||
|
||
## Command Execution | ||
|
||
To execute the `phpstan:init` command, run the following: | ||
|
||
`vendor/bin/whitecat phpstan:init` | ||
|
||
## Generated PHPStan Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks if PHPStan is installed as a development dependency. | ||
2. If PHPStan is not installed, it displays a warning message with instructions on how to install it using Composer. | ||
3. Copies the `phpstan.neon` configuration file to the specified distribution directory. | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenario: | ||
|
||
* If the `phpstan.neon` file already exists, the user can choose to override it. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during the validation or file copying process, appropriate error messages are displayed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# PHPUnit Initialization Command Documentation | ||
|
||
## Introduction | ||
|
||
The `phpunit:init` command sets up basic configuration for PHPUnit in a PHP library. | ||
|
||
## Usage | ||
|
||
`vendor/bin/whitecat phpunit:init` | ||
|
||
## Command Options | ||
|
||
The command does not accept any additional options or arguments. It automatically detects the presence of PHPUnit in the `require-dev` section of the `composer.json` file. | ||
|
||
## Command Execution | ||
|
||
To execute the `phpunit:init` command, run the following: | ||
|
||
`vendor/bin/whitecat phpunit:init` | ||
|
||
## Generated PHPUnit Setup | ||
|
||
The command performs the following tasks: | ||
|
||
1. Checks if PHPUnit is installed as a development dependency. | ||
2. If PHPUnit is not installed, it displays a warning message with instructions on how to install it using Composer. | ||
3. Copies the `phpunit.xml` configuration file to the specified distribution directory. | ||
4. Copies the PHPUnit configuration directory to the specified distribution directory. | ||
|
||
## Confirmation Prompts | ||
|
||
The command prompts the user for confirmation in the following scenarios: | ||
|
||
* If the `phpunit.xml` file already exists, the user can choose to override it. | ||
* If the PHPUnit configuration directory already exists, the user can choose to override it. | ||
|
||
## Command Output | ||
|
||
Upon successful execution, the command outputs a success message. | ||
|
||
## Exceptions | ||
|
||
If any errors occur during the validation or file copying process, appropriate error messages are displayed. |