Preparing to deploy the features.json file

Prepare to deploy the features.json file by copying the existing development version of the file and making changes for deployment.

About this task

You need two versions of the features.json file. You use one version of the file for development purposes, and another version of the file for deploying the new application. The files are identical, with two exceptions.
  • The value that you define in the navigation > route > link property differs between the development and deployment file versions.
  • The directories where you place the file for local development should be put into the <order_hub_code_directory>/shell-ui/assets/dev directory, while the file for deployment should be put into the <order_hub_code_directory>/shell-ui/assets directory.
After you create a features.json file for development purposes, you can then make a copy of the file and make the changes for deployment.

Procedure

  1. Complete the following task to create the development version of the features.json file: Creating the features.json files.

    For example:

    <order_hub_code_directory>/shell-ui/assets/dev/features.json:
    Figure 1. Sample features.json for development
    [
    {
      "id": "monorepo",
      "title": "Custom Mono Repo",
      "icon": "programs-30",
      "sequence": "10.4011",
      "iconForRailStateOnly": true,
      "navigation" : {
    	"route" : {
    		"link": "https://localhost:9300/custom-monorepo",
    		"path": "/monorepo"
    	}
      },
      "type": "IFRAME"
    },
    {
      "id": "angularrepo",
      "title": "Custom Angular Repo",
      "icon": "tool-30",
      "sequence": "10.16",
      "navigation" : {
    	"route" : {
    		"link": "https://localhost:4000/custom-angularrepo",
    		"path": "/angularrepo"
    	}
      },
      "enablementCondition": {
           "byResourceId": "BUCWSP"
      },
      "type": "IFRAME"
    }
    ]
  2. Copy the development version of the file to create a deployment version of the file.

    From: <order_hub_code_directory>/shell-ui/assets/dev/features.json

    To: <order_hub_code_directory>/shell-ui/assets/features.json

  3. Update the navigation > route > link property in the deployment version of the file.

    When creating the file for deployment, the value is set to /order-management-customization/<base-href>/<path to the page>. The base-href represents the base href that is used to build the Angular repository.

    The file for deployment should be put into the <order_hub_code_directory>/shell-ui/assets directory.

    For example:

    <order_hub_code_directory>/shell-ui/assets/features.json:
    Figure 2. Sample features.json for deployment
    [
    {
      "id": "monorepo",
      "title": "Custom Mono Repo",
      "icon": "programs-30",
      "sequence": "10.4011",
      "iconForRailStateOnly": true,
      "navigation" : {
    	"route" : {
    		"link": "/order-management-customization/custom-monorepo",
    		"path": "/monorepo"
    	}
      },
      "type": "IFRAME"
    },
    {
      "id": "angularrepo",
      "title": "Custom Angular Repo",
      "icon": "tool-30",
      "sequence": "10.16",
      "navigation" : {
    	"route" : {
    		"link": "/order-management-customization/custom-angularrepo",
    		"path": "/angularrepo"
    	}
      },
      "enablementCondition": {
           "byResourceId": "BUCWSP"
      },
      "type": "IFRAME"
    }
    ]

What to do next

Build customizations. For more information, see Building the customizations.