generate:composer

Generate a composer.json file

Usage:

drupal generate:composer  [options]
gcom

Available options

OptionDetails

--module

Tên module.

--name

Package name

--type

Package type

--description

Package description

--keywords

Package keywords

--license

License

--homepage

Project homepage

--minimum-stability

Mininmal stability

--authors

Authors of the project

--support

Support channels

--required

Required packages

Examples

Generate composer file specifying the module machine name, package name, package type, package description, keywords, lincense, homepage, minimum stability, authors, support channels and required packages

drupal generate:composer \
  --module="module_name" \
  --name="drupal/module_name" \
  --type="drupal-module" \
  --description="Package description" \
  --keywords='Drupal' --keywords='logging' \
  --license="GPL-2.0+" \
  --homepage="https://www.drupal.org/project/module_name" \
  --minimum-stability="stable" \
  --authors='"name":"Author name", "email":"author@email.com", "homepage":"http://website.com", "role":"Developer"' \
  --support='"channel":"email", "url":"author@email.com"' \
  --support='"channel":"source", "url":"http://github.com"' \
  --required='"name":"drupal/views", "version":"^1.0"' \
  --required='"name":"drupal/token", "version":"^2.0"'