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

fix: validate project name #1039

Merged
merged 2 commits into from
Apr 25, 2018
Merged

Conversation

hiroppy
Copy link
Contributor

@hiroppy hiroppy commented Mar 26, 2018

Related #1024.

Add validate-npm-package-name.

Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

LGTM! 👍


async function create (projectName, options) {
const inCurrent = projectName === '.'
const name = inCurrent ? path.relative('../', process.cwd()) : projectName
const targetDir = path.resolve(projectName || '.')

if (!validateProjectName(projectName).validForNewPackages) {
Copy link
Member

Choose a reason for hiding this comment

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

It should be !validateProjectName(name) here.

ISSUE: vuejs#1024
Add validate-npm-package-name.
@hiroppy hiroppy force-pushed the feature/validate-project-name branch from 6ff7466 to ab4813f Compare March 26, 2018 23:31
@hiroppy
Copy link
Contributor Author

hiroppy commented Mar 26, 2018

@javoski PTAL

@yyx990803 yyx990803 merged commit 78ed155 into vuejs:dev Apr 25, 2018
@hiroppy hiroppy deleted the feature/validate-project-name branch May 7, 2018 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants