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

Add version to input prompts for package.json template #43

Merged
merged 1 commit into from
Mar 13, 2016

Conversation

jpokrzyk
Copy link
Contributor

Version number in the package.json file is required per the NPM spec: https://docs.npmjs.com/files/package.json

I only noticed this because I use cmder for cli in windows and it has some sort of built in node parser that complains about it after every command until I add the version number.

I tested and seems to work fine.

yyx990803 added a commit that referenced this pull request Mar 13, 2016
Add version to input prompts for package.json template
@yyx990803 yyx990803 merged commit 0380faf into vuejs-templates:master Mar 13, 2016
@chrisvfritz
Copy link
Contributor

@yyx990803 I hate to say this after-the-fact, but I'm actually wondering whether this shouldn't be reverted. 😞 While the docs do say a version is required, that information is actually out of date, because it doesn't really make sense for projects that will never be published as a module. So this just creates extra work at the start of a project for no gain.

@jpokrzyk The real problem is in cmder and will be fixed in version 1.3. You can follow that link for instructions to get the fix early if you want. 😃

@yyx990803
Copy link
Contributor

Well I guess it doesn't hurt to have a version, given that you can just press enter for the default value. In the meanwhile this avoids people running into problems with cmder. Another option is removing the prompt but leave the version in there.

@jpokrzyk
Copy link
Contributor Author

I didn't put it in there specifically for me or cmder. That's just how I noticed it. It was a required field per the docs so I thought I should add it. I don't have a strong opinion to have it in there though.

@chrisvfritz
Copy link
Contributor

@jpokrzyk You definitely did the right thing. The maintainers of NPM have just chosen to keep a known oversimplification in the docs in an attempt to keep them simpler for package maintainers - at least until they come up with a nice, concise way to explain the exception.

@yyx990803 Given those options, my personal preference would be to skip the prompt and just automatically add a version to package.json. I wonder if "version": "*" would be a good compromise? I'm thinking the advantage there is it doesn't imply versioning in a project where it probably won't apply.

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.

3 participants