smalot/drupal-console-build
Composer 安装命令:
composer require smalot/drupal-console-build
包简介
Expose new commands to Drupal Console to run builds using a config file.
README 文档
README
Expose new commands to Drupal Console to run builds using a config file.
Setup
Include this library in your Drupal project:
composer require "smalot/drupal-console-build:*"
Must be added in your settings.yml file.
services: console.deploy_run: class: Smalot\Drupal\Console\Build\Command\RunCommand arguments: [] tags: - { name: drupal.command } console.deploy_list: class: Smalot\Drupal\Console\Build\Command\ListCommand arguments: [] tags: - { name: drupal.command }
Sample config file
File: .build.yml
should be at the same folder level as the .git/.
# List stages enabled stages: - compile - cache - features # Commands section compile_css: stage: compile script: - echo "Compile SASS file into CSS" - compass build allow_failure: true cache_rebuild: stage: cache script: - echo "Cache Rebuild" - cd web && drush cache-rebuild features_revert: stage: features script: - echo "Features revert all" - cd web && drush fra -y except: - master
Settings
stages allows to group commands and to order them during process.
If stages entry is specified, all commands without stage attribute won't be run.
Both only and except accepts regex patterns (must be surrounded by backslash /).
You can't specify only and except at the same time.
command: only: - "/^fix-.*$/i"
The allow_failure will report a command in error, but won't stop future commands.
Otherwise, the whole build will stop at the first command line error.
Usage
Run all tasks
drupal build:run
Run all tasks of one stage
drupal build:run --stage=cache
Run specific tasks
drupal build:run compile_css cache_rebuild
统计信息
- 总下载量: 54
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-22