Provide option to rewrite project/module paths.
This commit is contained in:
@@ -2,8 +2,6 @@ import path from "path";
|
||||
import {readFile, writeFile, mkdir, copyFile} from "fs/promises";
|
||||
import {capitalize, getConfigs} from "../../helpers.js";
|
||||
|
||||
const {modulesPath, projectPath} = getConfigs();
|
||||
|
||||
export async function buildHubspotEmail(blockName) {
|
||||
const distPath = await createDistFolder(blockName);
|
||||
|
||||
@@ -217,6 +215,7 @@ export function convertToHubspotField(field = {}) {
|
||||
}
|
||||
|
||||
export async function buildHubspotJSONFiles(distPath, metaData) {
|
||||
const {modulesPath, projectPath} = getConfigs();
|
||||
await writeFile(path.join(distPath, 'meta.json'), JSON.stringify(metaData, null, 4));
|
||||
|
||||
const blockJSON = await readFile(path.join(projectPath, 'block.json'), "utf8");
|
||||
|
||||
@@ -3,9 +3,8 @@ import {copyFile, readFile, writeFile} from "fs/promises";
|
||||
import {capitalize, getConfigs} from "../../helpers.js";
|
||||
import {buildHubspotJSONFiles, createDistFolder, handlebarsToHubl,} from "./hubspot-email-adapter.js";
|
||||
|
||||
const {modulesPath, projectPath} = getConfigs();
|
||||
|
||||
export async function buildHubspotPage(blockName) {
|
||||
const {modulesPath, projectPath} = getConfigs();
|
||||
const distPath = await createDistFolder(blockName);
|
||||
|
||||
const srcPath = path.join(projectPath, 'src');
|
||||
|
||||
Reference in New Issue
Block a user