Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate the package name #5

Open
gr2m opened this issue Mar 5, 2021 · 0 comments
Open

validate the package name #5

gr2m opened this issue Mar 5, 2021 · 0 comments
Labels
pull request welcome Ready to work on

Comments

@gr2m
Copy link
Member

gr2m commented Mar 5, 2021

we validate the repository name today:

{
type: "input",
name: "repository",
message:
"Full name of the repository. Name must start with 'octoherd-script-' (Example: octocat/octoherd-script-hello-world)",
default: (answers) => {
if (answers.packageName.startsWith("@octoherd")) {
return answers.packageName.substr(1);
}
return answers.packageName.startsWith("@")
? answers.packageName.substr(1)
: [login, answers.packageName].join("/");
},
validate: (input) =>
/^[^/]+\/octoherd-script-/.test(input) ||
/^octoherd\/script-/.test(input),
},

but not the npm package

{
type: "input",
name: "packageName",
message:
"What npm package name should the project have? (Example: octoherd-script-hello-world)",
},

I think that package names should be one of three

  • octoherd-script-<my name>
  • @my-scope/octoherd-script-<my name>
  • @octoherd/script-<my name>
@gr2m gr2m added the pull request welcome Ready to work on label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request welcome Ready to work on
Projects
None yet
Development

No branches or pull requests

1 participant