USER INTERFACE BUILD GUIDE
The current GUI build is based on Grunt.
Grunt is a JavaScript Task Runner - an automation tool for performing repetitive tasks like minification, compilation, unit testing, linting etc.
The tasks performed during a typical GUI build are
- Pre Build checks (For Some development rules)
- ESLint for the JS files
- SCSS compilation to CSS
- CSS optimization
- HTML minification
- JS minification
- r.js Optimization to pack all the dependencies of a component into single file.
- Updating the files with configuration specified in the properties.json file.
- Generate integrity for all component files.
- Cache Busting for resources
- Generate resource bundle for English language
Running UIUser Interface Build:
Follow steps below to run UI Build:
- First make sure that Node js is installed on the machine and grunt is available in global scope.
- Run npm install command inside _build folder.
- Now run build.sh to run the build
The properties.json file under _build folder is a configuration file having parameters to be set during build time:
- resource_base_path: The base path from which the JS and HTML resources are to be fetched. It can be a relative path pointing to the same domain the page is running or fully qualified path to server. This can be configured to implement Domain Sharding. Default value of it set as “/”
- image_base_path: The base path from which the image resources are to be fetched. It can also be a relative path pointing to the same domain the page is running on or a fully qualified path to different server on which images are hosted. See Domain Sharding. Default value of it set as "/images".
- brand_base_path: This property is same as image_base_path used for those images which are brand dependent.
- application_base_url: The application base resource path to which all the ajax calls are directed to. Default value of it set as “/digx”.
- application_base_url: This property hold the value of REST Application version. Default value of it set as “v1”
- default_entity: This property hold the value of default entity of the application. This value used when entity not available to use. All request used this value.
- oam_base_url: This is the URL of OAM server for validating username and password.
- obdx_base_path: To fund wallet using own bank account, need to redirect to bank portal.
- secure_page: Set the protected page pathname, for example, “/pages/home.html”.
- public_page: Set the public page pathname, for example, “/index.html”
- rtl_languages: In this property user can define the list of languages which supports RTL(Right To Left). This property supports array of languages. Default value of it is [‘ar’]
- localCurrency: This property stores the common currency used for implementation. This common currency is the default currency used in OBDX Application. All the origination request are using this property.
- fb_sdk_url: This property stores the facebook SDK API URL. It is being used in OBDX Facebook component of social media module.
- fb_api_key: This property stores the API key for the Facebook application. This API key is used for initializing and authenticating Facebook API.
- linkedin_sdk_url: This property stores the Linkedin SDK API URL. It is being used in OBDX Linkedin component of social media module.
- linkedin_api_key: This property stores the API key for the Linkedin app. This API key is used for initializing and authenticating Linkedin API.
- google_map_sdk: This property is a unique key of google map to be integrated in OBDX application. User need to enable the used API for respective key in on developer.google.com after creating the key from same.
- google_map_url: This URL is used to launch Google Maps with the location details passed as query parameters. Default value of it set as http://maps.google.com/maps.