From e9827fdd88a66637e78de28316bbf79d7edf862c Mon Sep 17 00:00:00 2001 From: Roman Axelrod Date: Wed, 14 Dec 2022 12:01:52 +0200 Subject: [PATCH] Fix dist path of hubspot blocks. --- platforms/hubspot/hubspot-email-adapter.js | 4 ++-- platforms/hubspot/hubspot-page-adapter.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platforms/hubspot/hubspot-email-adapter.js b/platforms/hubspot/hubspot-email-adapter.js index ba1618d..14a0f32 100644 --- a/platforms/hubspot/hubspot-email-adapter.js +++ b/platforms/hubspot/hubspot-email-adapter.js @@ -18,8 +18,8 @@ export async function buildHubspotEmail(blockName) { }); } -export async function createDistFolder(blockName) { - const distPath = path.join('exports', 'hubspot', `${blockName}.module`); +export async function createDistFolder(blockName, projectPath = '') { + const distPath = path.join(projectPath, 'exports', 'hubspot', `${blockName}.module`); await mkdir(distPath, {recursive: true}) return distPath; diff --git a/platforms/hubspot/hubspot-page-adapter.js b/platforms/hubspot/hubspot-page-adapter.js index f5096c0..a9b1cf7 100644 --- a/platforms/hubspot/hubspot-page-adapter.js +++ b/platforms/hubspot/hubspot-page-adapter.js @@ -5,7 +5,7 @@ import {buildHubspotJSONFiles, createDistFolder, handlebarsToHubl,} from "./hubs export async function buildHubspotPage(blockName) { const {modulesPath, projectPath} = getConfigs(); - const distPath = await createDistFolder(blockName); + const distPath = await createDistFolder(blockName, projectPath); const srcPath = path.join(projectPath, 'src');