fix: Allow dashes in plugin names
This commit is contained in:
parent
32be41209e
commit
062c1a101e
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ import {
|
||||||
path,
|
path,
|
||||||
globDir,
|
globDir,
|
||||||
copyFolderRecursively,
|
copyFolderRecursively,
|
||||||
|
mkdir,
|
||||||
rm,
|
rm,
|
||||||
root,
|
root,
|
||||||
templateOut,
|
templateOut,
|
||||||
|
@ -185,8 +186,8 @@ function validatePluginName(name) {
|
||||||
if (Object.keys(plugins).includes(pluginName.toLowerCase()))
|
if (Object.keys(plugins).includes(pluginName.toLowerCase()))
|
||||||
return `Sorry but ${pluginName} is already taken so you'll need to pick something else`
|
return `Sorry but ${pluginName} is already taken so you'll need to pick something else`
|
||||||
|
|
||||||
if (/^([a-z]+)$/.test(name)) return true
|
if (/^([a-z-]+)$/.test(name)) return true
|
||||||
else return ' 🙈 Please use only [a-z], no spaces, no capitals, no nothing 🤷'
|
else return ' 🙈 Please use only [a-z] or dash, no spaces, no capitals, no nothing 🤷'
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createDesign(name, template) {
|
async function createDesign(name, template) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue