From bba5295b8ad1f0e1e1e858ef5f250b2179419759 Mon Sep 17 00:00:00 2001 From: mbehzad Date: Fri, 21 Jun 2024 16:26:49 +0200 Subject: [PATCH] fix(pv-create-component): if component is created w/o a hbs template, dont reference it in the demo --- packages/pv-create-component/lib/templates/hbsDemoTemplate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pv-create-component/lib/templates/hbsDemoTemplate.js b/packages/pv-create-component/lib/templates/hbsDemoTemplate.js index e009ebd5..6202bcaf 100644 --- a/packages/pv-create-component/lib/templates/hbsDemoTemplate.js +++ b/packages/pv-create-component/lib/templates/hbsDemoTemplate.js @@ -1,9 +1,9 @@ -module.exports = function({componentName, dataFile}) { +module.exports = function({componentName, dataFile, hasHbs}) { return ( `--- layout: default --- -{{> ${componentName}${dataFile ? ` @root.${componentName}__data` : ""}}} +${hasHbs ? `{{> ${componentName}${dataFile ? ` @root.${componentName}__data` : ""}}}` : ""} `); };