onokumus / metismenu

A collapsible jQuery menu plugin
https://onokumus.github.io/metismenu/
MIT License
1.96k stars 487 forks source link

Make jquery a peer dependency #170

Closed mrdziuban closed 6 years ago

mrdziuban commented 6 years ago

jquery was added as a dependency in 8e060073cc56d015eb369b2ab12d9729a165fe0c. Unfortunately this causes issues when using metismenu with a different version of jquery, because the node_modules directory has this structure:

node_modules/
├── jquery/
└── metismenu/
    └── jquery/

In the application I'm working on, this causes the output generated by webpack to include two versions of jquery, and breaks metismenu because it's referencing a different version than the rest of my application.

This pull request changes jquery to be a peer dependency to indicate that it should be provided by users of metismenu, which will ensure that only one version of jquery is bundled.

onokumus commented 6 years ago

@mrdziuban Thanks for PR.