ZX: template

zx template Type

Have ZX create source files from templates in the current directory according to the current project's meta information. Which type of structure will be templated depends on the Type argument passed in. When this command is run ZX will prompt the user to provide a name for the service which, when combined with the project's prefix, will become the basis for the module names generated. ZX will check for potential module name conflicts with other packages visible in Zomp and warn if conflicts are found.

Currently only one pattern exists as an independent template (outside of templates used to generate complete projects with the zx create project command), the "Service ⇒ Worker Pattern".

The type code for this pattern is swp and will generate a sub-service structure of four files:

After running zx template swp it is up to the programmer to add the sub-service's top level supervisor to the project's supervision tree in an appropriate place.