Skip to content

jQuery and what-input should be peerDependencies #11290

@ncoden

Description

@ncoden

Description

I think that all current dependencies should be considered as peerDependencies for the following reasons:

  • When using the distribution files foudation.js, we expect the user to import jQuery by themself. To do this, we consider jQuery as an external in our build process and actually reproduce the peerDependency behavior.
  • Foundation register itself to jQuery and can be seen as a jQuery plugin.
  • Users do not expect jQuery to be specific to Foundation and want it to be imported only once, like most frontend dependencies.

peerDependencies is for dependencies that are exposed to (and expected to be used by) the consuming code, as opposed to "private" dependencies that are not exposed, and are only an implementation detail.

See:

Possible Solution

Move jquery and what-input to peerDependencies (but also devDependencies for local developement usages - see yarnpkg/yarn#1503).

Checklist (all required):

  • I have read and follow the CONTRIBUTING.md document.
  • There are no other issues similar to this one.
  • The issue title is descriptive.
  • The template is correctly filled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions