Remove unused files that were migrated to create-block package.
This commit is contained in:
@@ -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(' ');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user