is pretty good, but I'd like to have some more logic in my configuration. Is there a standard way for this?
For drush
I have .drush/aliases.drushrc.php
, which includes scripts from various Drupal repositories, which in turn contain the logic to handle various sites and variations (production, development). I'd like to have something similar for wp-cli
, and YAML doesn't provide me with the right tools for what I want.
https://make.wordpress/cli/handbook/config/#config-files is pretty good, but I'd like to have some more logic in my configuration. Is there a standard way for this?
For drush
I have .drush/aliases.drushrc.php
, which includes scripts from various Drupal repositories, which in turn contain the logic to handle various sites and variations (production, development). I'd like to have something similar for wp-cli
, and YAML doesn't provide me with the right tools for what I want.
1 Answer
Reset to default 1The WP CLI aliases are mostly for context. WP CLI uses Drush as a source of inspiration, but Drush has a much more robust implementation of aliases.
If it were me, I would include other scripts and complex logic as a custom command.
WP_CLI::add_command( 'core foo', 'Foo_Command' );
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745435462a4627586.html
评论列表(0条)