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 a flag for selecting devDependency as a default #6

Closed
mikolalysenko opened this issue Sep 18, 2013 · 1 comment
Closed

Add a flag for selecting devDependency as a default #6

mikolalysenko opened this issue Sep 18, 2013 · 1 comment

Comments

@mikolalysenko
Copy link
Contributor

The current method for selecting whether to list a package to be a devDependency vs. regular dependency is a bit ad-hoc:

https://github.com/isaacs/init-package-json/blob/master/default-input.js#L7

It would be nice if modules could specify somewhere in their package.json whether they should be installed by default as a devDependency vs. as a normal dependency. For example, I use tape a lot for the browser based test harness and it is a bit annoying having to go back and fix the dependency each time I do npm init.

As a sketch of how this could work, you could just add a field like the preferGlobal (call it preferDevelopment for example) that init-package-json checks to determine whether the dependency gets added as a normal dependency or a devDependency.

@timoxley
Copy link
Contributor

timoxley commented Jan 7, 2014

Good idea, npm init jamming everything into dependencies is terribly annoying. At a minimum it'd be nice if npm didn't take things already defined as devDependencies and put them in deps.

@wraithgar wraithgar closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
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

No branches or pull requests

3 participants