andresvillenas/Sitecore.Extensions

View on GitHub
Sitecore.Extensions/App_Config/Include/Unicorn/Unicorn.Configs.Dependency.config.example

Summary

Maintainability
Test Coverage
<!--
    This is an example of how to configure a Unicorn configuration that depends on other Unicorn configurations.

    Enabled configuration definition patches should be present on all environments Unicorn is present on.

    See Unicorn.config for commentary on how configurations operate, or https://github.com/kamsar/Unicorn/blob/master/README.md
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
    <sitecore>
        <unicorn>
            <configurations>
                <!--
                    This is an example of how to configure a Unicorn configuration that, when synced along with Default Configuration,
                    will always sync after it because it is a dependency.
                        
                    Dependencies do NOT force additional configurations to sync. So if you chose to sync only Sample Dependent Configuration,
                    it would not automatically sync Default Configuration. Dependency only comes into play when all dependencies are syncing at once,
                    or when all configurations sync together.
                -->
                <configuration name="Sample Dependent Configuration" dependencies="Default Configuration">
                </configuration>

                <!-- You may depend on more than one configuration. Transitive dependency relationships (e.g. A->B->C) are respected. -->
                <configuration name="Sample Doubly Dependent Configuration" dependencies="Default Configuration,Sample Dependent Configuration">
                </configuration>

                <!-- You may depend on configurations by wildcards. -->
                <configuration name="Sample Wildcard Dependent Configuration" dependencies="Foundation.*,Project.*">
                </configuration>

                <!-- 
                    Configurations will AUTOMATICALLY depend on each other if they include descendant roots of each other
                    e.g. in this example, 'Sample Implicit Child Configuration' will depend on 'Sample Implicit Parent Configuration'
                -->
                <configuration name="Sample Implicit Parent Configuration">
                    <predicate>
                        <include database="master" path="/sitecore/content" />
                    </predicate>
                </configuration>
                <configuration name="Sample Implicit Child Configuration">
                    <predicate>
                        <include database="master" path="/sitecore/content/Home" />
                    </predicate>
                </configuration>
                
                <!-- 
                    Picked up an implicit dependency you don't want? You can reject specific implicit dependencies, including with wildcards:
                -->
                <configuration name="Sample Rejected Implicit Dependency Configuration" ignoredImplicitDependencies="Foundation.Serialization,Project.*">
                </configuration>
            </configurations>
        </unicorn>
    </sitecore>
</configuration>