react-gsap-enhancer icon indicating copy to clipboard operation
react-gsap-enhancer copied to clipboard

Is there a reason `gsap` and `react` are not declared in peerDependencies?

Open antitoxic opened this issue 9 years ago • 3 comments

They are required and also mentioned in the readme.

antitoxic avatar Oct 28 '16 14:10 antitoxic

Hey, GSAP is not declared because it's commonly used as a script tag import. I left React out as well because i don't have a sable understanding about how peerDependencies works and i can't imagine that anyone would use this without React.

Do you think we should add something like

"peerDependencies": {
  "react": "^0.14.0 || ^15.0.0-0",
}

to the package.json?

azazdeaz avatar Oct 28 '16 15:10 azazdeaz

Peer dependencies are just like warnings to the developer for packages that are addons to other.

About the example - yes I think it will be sufficient. However I think gsap should also be included. If I install react-gsap-enhancer via npm/yarn/jspm then it's 99% certain that I'm also including gsap the same way.

If someone is using react-gsap-enhancer via a script tag, then the whole package.json doesn't matter :)

antitoxic avatar Oct 28 '16 16:10 antitoxic

I'm installing react-gsap-enhancer through npm but including GSAP from a CDN (as a script tag)

sebastiancarlsson avatar May 13 '17 12:05 sebastiancarlsson