Remove unused files that were migrated to create-block package.

This commit is contained in:
2022-10-17 16:05:58 +03:00
parent 1132790fd8
commit 1d3aec4dff
18 changed files with 2351 additions and 10043 deletions
+15 -1
View File
@@ -1,5 +1,4 @@
import {readFile, writeFile, mkdir, copyFile} from "fs/promises";
import {capitalize} from "../../helpers.js";
export async function buildHubspot(blockName) {
const distPath = `./exports/hubspot/${blockName}.module`;
@@ -225,3 +224,18 @@ function convertToHubspotField(field = {}) {
});
}
}
export function capitalize(str) {
if (typeof str !== 'string') {
return '';
}
return str
.toLowerCase()
.split(/[ -_]/g)
.filter((word) => !!word)
.map((word) => {
return word.charAt(0).toUpperCase() + word.slice(1);
})
.join(' ');
}