How do we use tri-bundler?
Pull view files from the server using tri-pull, bundle them into a single JavaScript file with tri-bundler, and deploy the bundled view back to the server using tri-deploy command.
Steps
- Pull your view from the server
First, open your command prompt.
To pull your view files from the server, run the following tri-pull command:
tri-pull -u username -p password --url https://<workspace_id>.facilities.<mas_domain> -v view-exposed-namewhere-uapplies your Maximo® Real Estate and Facilities username,-papplies your Maximo Real Estate and Facilities password,--urldefines the server URL,-vdefines your view, andview-exposed-nameis the exposed name of your view (with the dash). - Bundle your view into a single JS file
Next, in your command prompt, change directory to the folder of the pulled view files that you want to bundle.
To bundle your view files from this folder, run the following tri-bundler command:
tri-bundler -u username -p password --url https://<workspace_id>.facilities.<mas_domain> -v view-exposed-name --component view-exposed-name-dev.js --output view-exposed-name.jswhere-uapplies your Maximo Real Estate and Facilities username,-papplies your Maximo Real Estate and Facilities password,--urldefines the server URL,-vdefines your view,view-exposed-nameis the exposed name of your view (with the dash),--componentdefines the root component filename of your view, and--outputdefines the output component filename that is generated for your view. - Deploy your view to the server
Next, return to the command prompt in the same folder of the pulled and bundled view files.
To deploy (or push) your view files to the server, run the following tri-deploy command:
tri-deploy -t https://<workspace_id>.facilities.<mas_domain> -u username -p password -v view-exposed-namewhere-ttargets the server URL,-uapplies your Maximo Real Estate and Facilities username,-papplies your Maximo Real Estate and Facilities password,-vdefines your view, andview-exposed-nameis the exposed name of your view (with the dash).Note: If your environment implements a firewall, the tri-deploy command must include 2 additional options and their values, where--basicuserapplies the username for basic authentication, and--basicpasswordapplies the password for basic authentication. Feel free to check out the tri-deploy options and details.