generate:composer
Generate a composer.json file
使用方法:
drupal generate:composer [options]
gcom
可用选项
选项 | 详细信息 |
---|---|
--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 |
例子
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"'