Configuration Development

Update a custom module's installation config, based on current site.

Useful for developing modules and profiles.

Update project config
drush cde MYPROJECT

See notes on format in the readme:
https://git.drupalcode.org/project/config_devel#config-devel

Example usage
https://www.drupalarchitect.info/projects/mantra-profile/updates/todo-document-use-config-devel-module

Custom Installation Config

Custom modules can have initial config in MODULE/config/install and MODULE/config/optional.

The module may define a custom entity with bundles, and provide config for a default type.

Once the module's config is installed, it will be exported to the site's config directory.

Developers may want to update the default config provided by the module after configuring the module in the UI and exporting new config.

To update the module config, you need to dig through the sites' config for the files you want and move them into the module's install or optional directory.

You should also remove the site UUID from the top of the file since it is not relevant here.

The Configuration Development module will do this for you with a Drush command.

drush cde - Config devel export.

Setup

In MODULE.info.yml, add the configuration to track (without .yml).

config_devel:
 install:
    - block.block.mantra_style_branding
    - block.block.mantra_style_breadcrumbs
    - block.block.mantra_style_footer
    - block.block.mantra_style_local_actions
    - block.block.mantra_style_local_tasks
    - block.block.mantra_style_mainpagecontent
    - block.block.mantra_style_messages
    - block.block.mantra_style_page_title
  optional:
    - core.entity_form_display.media.image.default

Usage

With the configuration in place, run drush cde to update existing config.

Module tags
Stability
Stable