]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
chore: move jQuery & what-input to peerDependencies #11290 11294/head
authorNicolas Coden <nicolas@ncoden.fr>
Tue, 22 May 2018 21:15:02 +0000 (23:15 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Tue, 22 May 2018 21:15:02 +0000 (23:15 +0200)
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.

* We need `jQuery` and `motion-ui` as peerDependencies instead of dependencies because we actually expect the user to install them. We cannot simply remove them because we still need the package managers to check for versions compatibilities and warn the user if they are missing.
* We need `jQuery` and `motion-ui` as devDependencies too because we use them for tests/build/documentation and peerDependencies are not installed (even in development mode - https://github.com/yarnpkg/yarn/issues/1503).

See https://github.com/zurb/foundation-sites/issues/11290

package.json

index 3a0df43ccc3ddca0feeced9a7dfb409239e3fdbc..7ded99fc06fe342edd5f799047fa749f059b4931 100644 (file)
@@ -24,7 +24,7 @@
     "deploy:docs": "gulp deploy:docs --color",
     "deploy:beta": "gulp deploy:beta --color"
   },
-  "dependencies": {
+  "peerDependencies": {
     "jquery": ">=2.2.0",
     "what-input": ">=4.1.0"
   },
@@ -75,6 +75,7 @@
     "husky": "^1.0.0-rc.2",
     "inquirer": "^5.2.0",
     "is-empty-object": "^1.1.1",
+    "jquery": ">=2.2.0",
     "js-yaml": "^3.8.4",
     "mocha": "^5.0.5",
     "mocha-headless-chrome": "^2.0.0",
@@ -98,6 +99,7 @@
     "vinyl-named": "^1.1.0",
     "webpack": "^4.5.0",
     "webpack-stream": "^4.0.3",
+    "what-input": ">=4.1.0",
     "yargs": "^11.0.0"
   },
   "engines": {