Skip to content

Commit

Permalink
Change trainCase to kebabCase
Browse files Browse the repository at this point in the history
  • Loading branch information
pierregradelet committed Nov 10, 2023
1 parent 2ecf6f0 commit deb9709
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cli/tasks/scaffold-wp/builders/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const buildBlock = async () => {
let blockName = "",
blockTitle = ""
await _askBlockName().then((answer) => {
blockName = changeCase.trainCase(answer.blockName)
blockName = changeCase.kebabCase(answer.blockName)
blockTitle = answer.blockTitle
})

Expand Down Expand Up @@ -138,7 +138,7 @@ const buildBlockType = async () => {
const formatedBlocks = blockFolder.map((block) => {
const blockName = block.substring(block.lastIndexOf("/") + 1)
return {
name: changeCase.trainCase(blockName),
name: changeCase.kebabCase(blockName),
upperCaseBlockName: changeCase.constantCase(blockName),
pasclaCaseName: blockName,
}
Expand Down
2 changes: 1 addition & 1 deletion cli/tasks/scaffold-wp/builders/option-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const buildOptionPage = () => {
let pageName = "",
pageTitle = ""
await _askOptionName().then((answer) => {
pageName = changeCase.trainCase(answer.pageName)
pageName = changeCase.kebabCase(answer.pageName)
pageTitle = answer.pageTitle
})

Expand Down
2 changes: 1 addition & 1 deletion cli/tasks/scaffold-wp/builders/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const buildPage = () => {
let createTemplate;

await _askPageName().then((answer) => {
pageName = changeCase.trainCase(answer.pageName)
pageName = changeCase.kebabCase(answer.pageName)
})

await _askIfTemplate().then((answer) => {
Expand Down
2 changes: 1 addition & 1 deletion cli/tasks/scaffold-wp/builders/post-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const buildPostType = async () => {
upperSingularPostTypeName = "",
upperPluralPostTypeName = ""
await _askPostTypeName().then((answer) => {
postTypeName = changeCase.trainCase(answer.postTypeName)
postTypeName = changeCase.kebabCase(answer.postTypeName)
upperSingularPostTypeName = answer.upperSingularPostTypeName
upperPluralPostTypeName = answer.upperPluralPostTypeName
})
Expand Down
2 changes: 1 addition & 1 deletion cli/tasks/setup/modules/setup-package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default async ({ packageJson, defaultProjectName, fakeMode } = {}) => {
type: "input",
message: "What's the project name? (dash-case)",
name: "projectName",
}).then((answer) => (projectName = changeCase.trainCase(answer.projectName)))
}).then((answer) => (projectName = changeCase.kebabCase(answer.projectName)))
log("> new project name:", projectName)

// Ask user for author
Expand Down

0 comments on commit deb9709

Please sign in to comment.