-
Notifications
You must be signed in to change notification settings - Fork 0
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
Require deps like jQuery, postscribe #9
Comments
True. Part of my reasoning for not including jQuery as a dependency was a note in on one of the USDS Standards releases referring to the decision to remove jQuery from their dependencies, because they received feedback that it was conflicting with other versions of jQuery some sites were already using. If you think that doesn't make sense for us, I can certainly add it in. Agreed that postscribe should be added as a dependency, that was an oversight. |
Ah, i see. That will come up when jQuery is global, like when you pull it in via a Although, tangentially, the main reason we need jQuery is for foundation's JS code, and foundation may require accessing it via the global window object. Not sure. I think this falls into the "peer dependency" category of node modules, where you always Have you ever heard of foundation dropping jquery? |
I'll do some testing re: including jQuery with |
Looks like in order for this to work, we'll also need to add jspm. I'm not entirely prepared to go down that rabbit hole at the moment, especially as adding jQuery as a |
What suggests jspm would be need to be involved? |
Upon closer inspection it does not appear that jspm is required after all. 👍 |
Fixed in bdba687. |
The js files appear to make use of jQuery and postscribe, but don't import the modules. Instead they assume the modules are globally available (in the
window
via a<script>
tag import). If someone's using this module viarequire
, they're probably not importing jquery and the like with<script>
tags though.package.json
should include both of these modules asdependencies
, and the files that use the modules should import them viarequire
, ie.var $ = require('jquery')
The text was updated successfully, but these errors were encountered: