「Drush」使っていますか?
Drupal開発をするにあたって、使わない人はいないCLIツールですよね。
今回は、READMEを1発で作ってくれるスクリプトを発見したので共有します。
検証環境
Drush 12系 で試しました。
コマンド実行
drush generate readme
実行後、2つほど質問があるので答えてください。
モジュールのマシンネームと、モジュール名ですね。
$ drush generate readme
Welcome to readme generator!
––––––––––––––––––––––––––––––
Module machine name:
➤ my_module
Module name [My Module]:
➤
確認
カスタムモジュールディレクトリに、{module}.info.yml
とREADME.md
が作成されているはずです。
{module}/README.md
# My module module
@todo Add an introduction that summarizes the purpose and function of the project.
## Table of contents
- Requirements
- Recommended modules
- Installation
- Configuration
- Maintainers
## Requirements
@todo Describe module requirements here.
## Recommended modules
@todo Add recommended modules here if needed.
## Installation
Install as you would normally install a contributed Drupal module. For further information, see [Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
## Configuration
@todo Describe module configuration here.
## Maintainers
- [YOUR_NAME] - [YOUR_NICKNAME](https://www.drupal.org/u/YOUR_NICKNAME)
コントリビュートモジュールを作成する時とかに便利そう。
まとめ
なにかとフォーマットがあると便利ですよね。
参考