From electron framwork, User Interface (UI) and Middleware (MW) will be running separately, this means the each device will have 2 pages running, one is the UI and one is the MW. This document list down the steps change the current device code into UI or MW.
Repositories
The separate UI and MW will be deployed in the new device URLs which is inside the current device <pid>
Example below for the staging environment.
UI URL ---- https://apps-staging.razer.com/synapse/products/<pid>/ui
MW URL ---- https://apps-staging.razer.com/synapse/products/<pid>/mw
Creating code baselines
1、checkout the latest device code from the device repository
2、Work on the code baselines
a、remove anne_common and razer-anna-utilities folder,as for MW
(1)、remove folder
(2)、add razer-anne-utilities as npm from the bitbuck repository
"razer-anne-utilities":"bitbucket:razersw/razer-anne-utilities#staging"
"razer-common":"bitbucket:razersw/razer-anne-common#staging"
(3)、update all import references of razer-anne-utilities and ane-common to the npm bitbucket above.
(4)、run build and fix any issues.
b、remove irrelevant code
c、run build and fix build errors
d、add some statement to communicate (such as replace the previous call window.dispatchEvent to MW with new broadcastChannel postMessage)or load the active profile settings. from local storage and set it into the UI redux store.