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

  1. 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-name where -u applies your Maximo® Real Estate and Facilities username, -p applies your Maximo Real Estate and Facilities password, --url defines the server URL, -v defines your view, and view-exposed-name is the exposed name of your view (with the dash).

  2. 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.js where -u applies your Maximo Real Estate and Facilities username, -p applies your Maximo Real Estate and Facilities password, --url defines the server URL, -v defines your view, view-exposed-name is the exposed name of your view (with the dash), --component defines the root component filename of your view, and --output defines the output component filename that is generated for your view.

  3. 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-name where -t targets the server URL, -u applies your Maximo Real Estate and Facilities username, -p applies your Maximo Real Estate and Facilities password, -v defines your view, and view-exposed-name is 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 --basicuser applies the username for basic authentication, and --basicpassword applies the password for basic authentication. Feel free to check out the tri-deploy options and details.