Preparing to deploy customizations for existing applications

Before you can deploy customizations that you made to existing applications (like <order_hub_code_directory>/buc-app-order), you need to indicate which customizations to deploy. For example, you can be working on two new routes but you might want to deploy only one.

Procedure

  1. Locate the next-generation Order Hub source code. The default location is devtoolkit_docker/orderhub-code.
  2. Update the package-customization.json file for every module that is customized.
    1. Open the <order_hub_code_directory>/<module-name>/package-customization.json file for each customized module.
    2. In the routes object, add every route in the module that is customized.
      Each key in the routes object identifies the customized route package. The value is an object with a single key that is called type. Make sure that the type property is always set to "code".

      For example,

      {
          "repositoryName": "buc-app-order",
          "customizationContextRoot": "/order-management-customization",
          "routes": {
              "create-order": {
                  "type": "code"
              }
          }
      }
      The customizationContextRoot object is preset to /order-management-customization. Do not change the value.
  3. Update the package.json file for every route that is customized.
    1. Open the ../<module-name>/packages/<route-name>/package.json file for each customized route.
    2. Locate the build-merged script within the file.
    3. Add the following parameter to the script.
      --deploy-url=/order-management-customization/<module-name>/<route-name>/
      for example,
      "build-merged": "ng build create-order --configuration=merged-prod --deploy-url=/order-management-customization/buc-app-order/create-order/",

What to do next

Build your customizations. For more information, see Building customizations in next-generation Order Hub.