Hammer&Wrench is a tool to help you debug, diagnose or develop modules, components, templates within the Mirele architecture.
Simply install the tool in the template folder and choose one of the paths:
- Connect the file directly to the template
- Use it as a CLI utility
ATTENTION: If you have already installed and worked with the Mirele developer tools - CREATE BACKUP package.json FILE! During the following operations this file will be overwritten. If you do not have this file - you can ignore this warning.
The distribution is the same as the theme. By 'distribution' we mean the theme installed in your WordPress. The tool is very easy to install. You can do it with just one command
(curl "https://raw.githubusercontent.com/irtex-mirele/Hammer-Wrench/main/Hammer&Wrench.php" > "Hammer&Wrench.php" && curl "https://raw.githubusercontent.com/irtex-mirele/Hammer-Wrench/main/project.json" > "project.json" && print "\u001b[37mMirele — \u001b[32mInstallation is successfully completed. The "install" step has been successfully completed")
Explanation of the code: Installation of Hammer&Wrench and package.json file
In your console you will see something like this.
At this step, the installation phase of the tool is successfully completed!
Make sure you have php 7+ installed, type the command in the terminal to do this:
php -v
Explanation of the code: Checking the PHP version
In the console you should get a version of your PHP, if it is installed
If you did not see the output of the PHP version in your console, we recommend using the following links to install PHP:
- https://www.php.net/manual/en/install.unix.debian.php
- https://linuxize.com/post/how-to-install-php-on-ubuntu-18-04
Also make sure that your version of PHP is above version 7.0.0.
After checking the PHP version, you can start working. To access the utility, enter the command
php "Hammer&Wrench.php"
Explanation of the code: Launch the Hammer&Wrench utility without arguments
If you did not see any errors in the console, it means that you did everything right! Congratulations on your first successes!
To know the available commands, pass the --help argument to the utility.
php "Hammer&Wrench.php" --help
Explanation of the code: Getting information about available commands of the utility
The rest of the information on commands can be found in the WiKi
Good luck in diagnosis and development