Skip to content

Commit c54e057

Browse files
Make it easier to override display-test-app configuration. (#3400)
* Make it easier to override display-test-app configuration. * clarify. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 6f84406 commit c54e057

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test-apps/display-test-app/src/frontend/DisplayTestApp.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { showStatus } from "./Utils";
1616
import { Dock } from "./Window";
1717

1818
const configuration: DtaConfiguration = {};
19+
1920
const getFrontendConfig = () => {
2021
if (ProcessDetector.isMobileAppFrontend) {
2122
if (window) {
@@ -30,6 +31,19 @@ const getFrontendConfig = () => {
3031
}
3132

3233
Object.assign(configuration, getConfig());
34+
35+
// Overriding the configuration generally requires setting environment variables, rebuilding the app, and restarting the app from scratch -
36+
// and sometimes that doesn't even work.
37+
// If you want to quickly adjust aspects of the configuration on the frontend, you can instead add your overrides below and just hot-reload the app in the browser/electron.
38+
// Obviously, don't commit such changes.
39+
const configurationOverrides: DtaConfiguration = {
40+
/* For example:
41+
iModelName: "d:\\bim\\Constructions.bim",
42+
disableInstancing: true,
43+
*/
44+
};
45+
Object.assign(configuration, configurationOverrides);
46+
3347
console.log("Configuration", JSON.stringify(configuration)); // eslint-disable-line no-console
3448
};
3549

0 commit comments

Comments
 (0)