From 3a9edb5c4f5d6b6518072e824bb9d9fa9e7484f0 Mon Sep 17 00:00:00 2001 From: Alex Hoyau Date: Thu, 3 Oct 2024 16:38:32 +0300 Subject: [PATCH] log the time it takes to publish pages --- src/ts/client/grapesjs/PublicationManager.ts | 2 ++ src/ts/plugins/client/template.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ts/client/grapesjs/PublicationManager.ts b/src/ts/client/grapesjs/PublicationManager.ts index 3e3007d53..2ea399018 100644 --- a/src/ts/client/grapesjs/PublicationManager.ts +++ b/src/ts/client/grapesjs/PublicationManager.ts @@ -339,7 +339,9 @@ export class PublicationManager { // Get the content from GrapesJS const body = page.getMainComponent() const cssContent = this.editor.getCss({ component: body }) + console.time(`getHtml ${page.getId()} ${page.get('name')}`) const htmlContent = this.editor.getHtml({ component: body }) + console.timeEnd(`getHtml ${page.getId()} ${page.get('name')}`) // Transform the file paths const slug = getPageSlug(page.get('name')) diff --git a/src/ts/plugins/client/template.ts b/src/ts/plugins/client/template.ts index 5824e71e9..a114604a8 100644 --- a/src/ts/plugins/client/template.ts +++ b/src/ts/plugins/client/template.ts @@ -15,6 +15,8 @@ * along with this program. If not, see . */ +throw new Error('This file is obsolete, templates have been replaced by Silex CMS plugin: https://github.com/silexlabs/silex-cms/') + // Silex serves /clients // @ts-ignore import { onAll } from '../client/utils.js'