Update create-test-boilerplate.js

Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
This commit is contained in:
Bertie690 2025-04-26 23:35:59 -04:00 committed by GitHub
parent 0e982c914a
commit b2a20b1075
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,7 @@ async function runInteractive() {
// Convert fileName to kebab-case // Convert fileName to kebab-case
// Ex: "Cud Chew/Cud-Chew" --> "cud-chew" // Ex: "Cud Chew/Cud-Chew" --> "cud-chew"
const fileName = fileNameAnswer.userInput const fileName = fileNameAnswer.userInput
.replace(/([a-z])([A-Z])/g, "$1_$2") // Convert camelCase to snake_case .replace(/([a-z])([A-Z])/g, "$1-$2") // Convert camelCase to kebab-case
.replace(/\s+/g, "-") // Replace spaces with underscores .replace(/\s+/g, "-") // Replace spaces with underscores
.toLowerCase(); // Ensure all lowercase .toLowerCase(); // Ensure all lowercase