From b098a36a7306ac8b1efdf3556779f8981f223aaa Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Tue, 19 Dec 2023 07:38:49 +1100 Subject: [PATCH] script to support ERC components --- examples/dojo-starter | 2 +- packages/core/bin/generateComponents.cjs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/dojo-starter b/examples/dojo-starter index f098b644..2a7cfaa1 160000 --- a/examples/dojo-starter +++ b/examples/dojo-starter @@ -1 +1 @@ -Subproject commit f098b6443aa5992da73486304c62d7eb1b2e5354 +Subproject commit 2a7cfaa15e11adec17163aeed0e45d9579273c35 diff --git a/packages/core/bin/generateComponents.cjs b/packages/core/bin/generateComponents.cjs index 2490b066..563810e4 100755 --- a/packages/core/bin/generateComponents.cjs +++ b/packages/core/bin/generateComponents.cjs @@ -54,7 +54,11 @@ manifest.models.forEach((model) => { let result = model.name.split("::").pop().split("_"); let modelName = result - .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) + .map((part) => { + return part === part.toLowerCase() && part.length > 2 + ? part.charAt(0).toUpperCase() + part.slice(1) + : part.toUpperCase(); + }) .join(""); try {