@snrankin/generate-wp-readme
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

WordPress Plugin ReadME Generator

Generates a conventional changelog, WordPress readme.txt and README.md from custom templates

View Demo . Report Bug . Request Feature

semantic-release: conventionalcommits GitHub package.json version (branch) Issues License

Table Of Contents

About The Project

I wanted an easy way to keep the WordPress readme.txt in sync with information from git. This CLI tool generates a conventionalcommit changelog file, a readme.txt file, and a README.md file. Enjoy!

Built With

Typescript

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
npm install npm@latest -g

Installation

To install and set up the library, run:

$ npm install -S @snrankin/generate-wp-readme

Or if you prefer using Yarn:

$ yarn add -D @snrankin/generate-wp-readme

Usage

Once installed via npm or yarn, simply run generate-wp-readme in your plugin folder and you're good to go! Make sure you have a {plugin}.php, a package.json and a template file

Flags/Options

Version

Output the version number

$ generate-wp-readme -v

Output File

The output file name relative to the cwd. Defaults to readme.txt.

$ generate-wp-readme -o <filename>

Changelog File

The changelog file name relative to the cwd. Defaults to CHANGELOG.md

$ generate-wp-readme -c <filename>

Main PHP File

Needs to exist prior to command execution

The main php file name relative to the cwd. Defaults to {process.cdw()}.php

$ generate-wp-readme -m <filename>

Template File

Needs to exist prior to command execution

The template file name relative to the cwd. Can be any text file. Defaults to .readme-template

$ generate-wp-readme -t <filename>

Screenshots Directory

Needs to exist prior to command execution

The screenshots directory relative to the cwd. Defaults to assets as per the WordPress plugin standard

$ generate-wp-readme -s <directory>

Changelog Length

Specify the number of versions to display before truncating the changelog.

$ generate-wp-readme -l <number>

Conventional Commit Preset

Specify a conventional commits preset.

  • angular
  • atom
  • codemirror
  • conventionalcommits (default)
  • ember
  • eslint
  • express
  • jquery
  • jshint
$ generate-wp-readme -p <preset>

Merge Codes

Merge Code Description Field Source │
{{__PLUGIN_NAME__}} The name of the plugin Plugin Name: --main-file │
{{__PLUGIN_SLUG__}} Taken from the current working folder process.cwd() │
{{__PLUGIN_URI__}} The plugin homepage Plugin URI: --main-file │
{{__PLUGIN_DESCRIPTION__}} Plugin Description Description: --main-file │
{{__PLUGIN_VERSION__}} The current project version. version: --package-file│
{{__PLUGIN_LICENSE__}} The project's license. License: --main-file │
{{__PLUGIN_LICENSE_URI__}} The URI to the project's license. License URI: --main-file │
{{__PLUGIN_MIN_WP__}} The minimum required WordPress core version. Requires at least: --main-file │
{{__PLUGIN_MIN_PHP__}} The minimum required PHP version. Requires PHP: --main-file │
{{__PLUGIN_TESTED_WP__}} The latest WordPress core version the plugin has been tested against. Tested up to: --main-file │
{{__PLUGIN_DONATE__}} The plugin donation link. funding: --package-file │
{{__PLUGIN_CONTRIBUTORS__}} The plugin contributors (including author) author:, contributors: --package-file │
{{__PLUGIN_TAGS__}} The plugin tags keywords: --package-file │
{{__PLUGIN_CHANGELOG_URI__}} A link to the full project changelog. --changelog-file │
{{__PLUGIN_CHANGELOG__}} The most recent changelog entries. --changelog-file │

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.

Creating A Pull Request

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Acknowledgements

Package Sidebar

Install

npm i @snrankin/generate-wp-readme

Weekly Downloads

2

Version

1.2.0

License

MIT

Unpacked Size

45.8 kB

Total Files

16

Last publish

Collaborators

  • snrankin