You can customize applications by adding new routes to new applications that you created.
You use the schematics command to create the packages for each route and update the files within the
application.
Procedure
-
Open a terminal and go to the Order Hub code directory. The default location is
devtoolkit_docker/orderhub-code.
- Go to the app-config.json file that is in the module that you want
to customize.
- Add the new routes that you want to include in the application.
- In the terminal, go to the customized module directory.
- Run the following schematics command. This command creates the packages for each new
route and update the necessary files within the application.
ng g @buc/schematics:add-app-to-existing-monorepo --app-config-json app-config.json --module-short-name short-name-for-the-module --prefix selector-prefix --mode on-prem --is-custom-app=true
The schematic supports the following options.
- --app--config-json
- This option is required. Use the existing app-config.json file in the module that you want to
customize.
- --module-short-name
- The short name for the module. If the module name has dashes, then the short name is the text
after the last dash. For example, if the module name is buc-app-settings, the module short name is
settings.
- --prefix
- The HTML selector to use for the generated components. The default is buc.
- --mode
- Set to on-prem to generate code applicable for Sterling™ Order Management System on-premises
deployments.
- --is-custom-app
- Indicates whether or not the current repository is a custom application. Use true to indicate
that the current repository is a custom application, or use false for an existing Order Hub application. The default is false.
For
example,
ng g @buc/schematics:add-app-to-existing-monorepo --app-config-json app-config.json --module-short-name monorepo --prefix monorepo --mode on-prem --is-custom-app=true
What to do next
Prepare to deploy, build, and test your customizations. For more information, see Preparing to deploy new applications.