npm install
in the SitecoreDXG Generation Service's installation directory.registerTrigger
function. This function is required, and has the job of performing the registration logic that binds the ID of the trigger to the function that should be called in order to start listening and executing the generation, which in this case is the _registrationCallback
function.TRIGGER_ID
property does not actually need to be made public via exports
, but it is a good practice to do so anyway.[SitecoreDXG-Generation-Service-Installation-Directory]/plugins/triggers
folder and copy in your custom trigger file. SitecoreDXG will dynamically load all files in this folder as triggers. Note that it is recommended that you add your trigger file into a sub-directory of the triggers
folder, e.g. triggers/MyTrigger
, for better organization. npm init
and then add the third-party modules to the package's dependencies. This will help keep your custom trigger more self-contained and modular, while avoiding the need to make changes to the SitecoreDXG Generation Service's native package.json[SitecoreDXG-Generation-Service-Installation-Directory]/settings.js
file and in the configuration
object update the value of the Trigger
property to the ID of your custom trigger. This will tell SitecoreDXG that your custom trigger is the one that should be registered and used. npm install
in either the SitecoreDXG Generation Service root or in the trigger's root to install the dependencies