DEGUGGING in dev build with process.env.NODE_ENV, + this.lastSceneSnapshot

This commit is contained in:
zsviczian
2024-05-22 20:08:49 +02:00
parent d05ccc0055
commit 32cd3a62b6
9 changed files with 285 additions and 105 deletions

View File

@@ -1,7 +1,9 @@
export const durationTreshold = 0; //0.05; //ms
export function setDebugging(value: boolean) {
DEBUGGING = value;
DEBUGGING = (process.env.NODE_ENV === 'development')
? value
: false;
}
export let DEBUGGING = false;

View File

@@ -16,7 +16,7 @@ export class StylesManager {
this.plugin = plugin;
const self = this;
plugin.app.workspace.onLayoutReady(async () => {
DEBUGGING && debug(undefined, "StylesManager.constructor > app.workspace.onLayoutReady", self);
(process.env.NODE_ENV === 'development') && DEBUGGING && debug(undefined, "StylesManager.constructor > app.workspace.onLayoutReady", self);
await this.harvestStyles();
getAllWindowDocuments(plugin.app).forEach(doc => {
this.copyPropertiesToTheme(doc);