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

Peer Dependencies #767

Closed
eddiemonge opened this issue Oct 1, 2013 · 3 comments
Closed

Peer Dependencies #767

eddiemonge opened this issue Oct 1, 2013 · 3 comments
Labels
Milestone

Comments

@eddiemonge
Copy link
Contributor

Shouldn't the things listed as peerDependencies in the package.json be dependencies? And if Karma doesn't depend on them and they really are optional plugins, shouldn't they have karma listed as a peerDependency and karma not have them listed at all?

Only reason I see to have them listed as PD's in Karma is so they are automatically installed to make it easier for devs to use them. I think this is a bad case and adds a lot of unneeded bloat. I think they better solution would be to document that if you want, say coffeescript support, then youhave to npm install --save-dev karma-coffee-preprocessor in your project (or add it globally to run karma standalone).

@vojtajina
Copy link
Contributor

@eddiemonge yep, you are correct the only reason is so that you can just install karma and it works (it includes karma-jasmine and some other default plugins).

Each plugin has a peerDependency on Karma.

Maybe we could have karma init to install the plugins you need...

@c089
Copy link

c089 commented Nov 13, 2013

I'd really love to see this go as well because it wastes quite some time downloading dependencies I don't need in my projects.

How about having a separate module, something like karma-quickstart or karma-bootstrap?

It's just an incomplete/opinionated set of dependencies anyway, if you use TAB in karma init to choose mocha, you have to install karma-mocha yourself...

@vojtajina
Copy link
Contributor

@c089 I can see doing this in 0.12, also karma init should install the plugins for you.

andersjanmyr pushed a commit to andersjanmyr/karma that referenced this issue Dec 6, 2013
Peer dependencies should not go from the parent to the children. The children
should peer depend on the parent project and not the other way around.
Closes karma-runner#767

BREAKING CHANGE:
People will need to explicitly install the plugins they need. `karma init`
should help with this.

Removed plugins that need to be installed explicitly are:

* karma-jasmine
* karma-requirejs
* karma-coffee-preprocessor
* karma-html2js-preprocessor
* karma-chrome-launcher
* karma-firefox-launcher
* karma-phantomjs-launcher
* karma-script-launcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants