Download the PHP package next-press/wordpress-hook-generator without Composer
On this page you can find all versions of the php package next-press/wordpress-hook-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download next-press/wordpress-hook-generator
More information about next-press/wordpress-hook-generator
Files in next-press/wordpress-hook-generator
Package wordpress-hook-generator
Short Description Parses the hooks and filters on our plugin and generate a markdown file with the contents.
License GPL-2.0-only
Homepage https://nextpress.co
Informations about the package wordpress-hook-generator
WordPress Hooks & Filters Parser
This is a handy wrapper around wordpress-hook-parser to fix some dependencies and make the code available as a CLI tool that we can use on projects.
It parses the folders passed to it and generates a markdown file containing all the hooks, filters, with the corresponding documentation.
To see an example of the generated markdown file, click here.
Installation
Unfortunately, since Composer 2, the caching schedule for Composer 1 packages is not being updated as frequently. So if you are not able to install it via composer global require next-press/wordpress-hook-generator
, try this first installation method instead.
How it should be
As a CLI tool, this should be installed globally using composer.
To install it, simply run:
Usage
After installing it globally, the CLI command wordpress-hook-generator
becomes available system-wide.
Then you simply run it passing the target folder as the first argument.
Options
In addition to the path to be scanned, there are additional options that can be passed to the command.
Output file -o
By default, the output is written to a file called actions.md
inside the directory where the command was ran.
You can override the output file name by passing a file path with the option -o
.
Ignore folders -i
By default, the vendor folder is ignored when scanning the target directory. If you wish to pass additional folder names to ignore, you can do so by using the -i
option.
The -i
option takes a comma-separated list of directory names.
Enable debugging -d
By default, PHP warnings thrown while generating the documentation are suppressed and not shown on the terminal window. Adding the -d
flag will display the warning messages.
Updating the Tool
You can update the tool by running the command below:
Development
To develop, test, or debug this tool, clone this repository and then be sure to first install both the PHP and node.js dependencies.
Clone the repository:
Then for PHP, install the composer dependencies.
Do the same for node.js with npm.
Important: Versioning
To bump the version number, run the command bellow on the root directory. This command is a shorthand for the npm version
command and by default it bumps the version patch number (from 0.0.1 to 0.0.2, for example).
If you need to bump the major or minor version numbers, use the full command below:
For a minor release:
And for a major release:
There is no need to manually update the @version tags on the code, as a pre-commit
is run by Husky to sync the version numbers, making sure they are always automatically up-to-date.
Changelog
Version 0.0.7 - Released on 2021-01-11
- Fixed: The @ignore tag is now respected;
- Added: Auto-update via the --update flag.
Version 0.0.6 - Released on 2021-01-10
- Fixed: Works for filters and actions inside class methods;
- Fixed: Final adjustments to the template;
Version 0.0.5 - Released on 2021-01-09
- Added: New template with the additional data;
Version 0.0.4 - Released on 2021-01-08
- Docs: Add an installation method that works as a fallback to composer global require;
Version 0.0.3 - Released on 2021-01-08
- Added: Link script - to be used while the package is not available on Packagist for composer v1;
- Added: Better error and warning message handling when the --debug flag is present;
Version 0.0.2 - Released on 2021-01-08
- Improvement: Add composer.json to the sync-version-number file list;
Version 0.0.1 - Initial Release - Released on 2021-01-08
- Initial Release;
All versions of wordpress-hook-generator with dependencies
next-press/wordpress-hook-parser Version dev-master
next-press/phpdoc-parser Version dev-master
nategood/commando Version ^0.4.0