Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸ‘Œ IMPROVE: prevent CLI from being created without a name #14

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

Open
selkasse wants to merge 1 commit into ahmadawais:master
base: master
Choose a base branch
Loading
from selkasse:validate-name

Conversation

@selkasse
Copy link

@selkasse selkasse commented Jun 10, 2022
edited by ghost
Loading

Copilot

πŸ€– Generated by Copilot at f03e3fa

Summary

πŸš«πŸš¨πŸ› οΈ

Add validation for project name input in utils/ask.js. Prevent creating a project with an empty name.

project name blank?
Validation says: "Please fill" -
Spring needs new blossoms

Walkthrough

  • Add a validation check for the project name input (link)

​

Human

As a result, the generated CLI is created in the same directory, and the package.json file has empty "name" and "bin" keys. This pull request adds the validation to prevent this issue.

{
	"name": "",
	"description": "break",
	"version": "0.0.1",
	"license": "UNLICENSED",
	"bin": {
		"": "index.js"
	},
	"author": {
		"name": "break",
		"email": "break",
		"url": "break"
	},
	"keywords": [
		"",
		"break"
	],
	"files": [
		"index.js",
		"utils"
	],
	"scripts": {
		"format": "prettier --write \"./**/*.{js,json}\""
	},
	"dependencies": {
		"chalk": "^4.1.2",
		"cli-alerts": "^1.2.2",
		"cli-handle-error": "^4.4.0",
		"cli-handle-unhandled": "^1.1.1",
		"cli-meow-help": "^3.1.0",
		"cli-welcome": "^2.2.2",
		"meow": "^9.0.0"
	},
	"devDependencies": {
		"prettier": "^2.6.2"
	}
}

Copy link
Owner

@ahmadawais ahmadawais Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please remove this file from your PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ahmadawais ahmadawais ahmadawais left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /