Combine different blocklets to form a more powerful blocklet.
Demo
Demo:
https://github.com/blocklet/component-demo
blocklet.yml:
https://github.com/blocklet/component-demo/blob/main/blocklet.yml
Config Services
The service configuration of Parent blocklet and Child blocklet are independent, not unified.
For the specific configuration method of services, see https://github.com/blocklet/blocklet-specification/blob/main/docs/meta.md
Parent blocklet services
- Parent blocklet services are configured in
interface.servicesin parent blocklet.yml
Child blocklet services
- Child blocklet services are configured in
interface.servicesin child blocklet.yml - When
children.mountPoints.servicesis configured in parent blocklet.yml, it will be merged with child blocklet.ymlinterface.services
Examples of merger strategies:
parent blocklet.yml:
name: parent-blocklet
interfaces:
- name: parentInterfaceName
children:
- name: child-blocklet
resolve: 'xxxx'
mountPoints:
- root:
- interfaceName: parentInterfaceName
child:
- interfaceName: childInterfaceName
services:
- name: s1
- name: s2
child blocklet.yml:
name: child-blocklet
interfaces:
- name: childInterfaceName
services:
- name: s2
- name: s3
Then the services of child blocklet are:
- s1 (from parent
children.mountPoints.services) - s2 (from parent
children.mountPoints.services) - s3 (from child
interface.services)