-
Notifications
You must be signed in to change notification settings - Fork 476
Prepare for npm publish #99
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
Conversation
b2ed7b3
to
fea4779
Compare
Hey @wbinnssmith the PR is failing CI, it doesn't look like you signed the CLA yet. |
I actually did submit the form. Is it handled manually or should I see an On Fri, Mar 27, 2015, 12:01 PM Dave Methvin notifications@github.com
|
You signed it, I just confirmed that. Thanks! The bot only runs on a push, it will hopefully be okay next time you push to your branch. |
fea4779
to
07257c4
Compare
Just pushed again and all looks good 😄 On Fri, Mar 27, 2015, 12:17 PM Arthur Verschaeve notifications@github.com
|
Let me know if there's anything I can do to help out. Would love to see On Fri, Mar 27, 2015, 12:46 PM Will Binns-Smith wbinnssmith@gmail.com
|
Thanks! Would you mind running a quick npm publish to get this onto the On Monday, April 6, 2015, Dave Methvin notifications@github.com wrote:
|
I'm not sure it's ready to release, there was a Testswarm failure I need to check into and also I wasn't planning on publishing a new release until jQuery 3.0.0 shipped. So it might be better to cherry-pick this into the last release and publish that. |
I just published the latest stable version of jquery-migrate (1.2.1), with this fix backported, to npm and added you as an owner. |
Wow, sorry, I just saw your notification! Actually, that is fine with me, thanks! |
This:
main
field to thepackage.json
pointing to the generated dist copy of jquery-migrate.npm prepublish
step to run grunt before publishing to npm.devDependencies
. jQuery is never directlyrequire
d by the code, and is implicitly assumed to exist (see backbone's package.json discussion for more info)This is deliberately unopinionated about CommonJS. I'd like to solve that issue in a separate pull request, but at least now jquery-migrate can be used with npm and either a script tag or a
jQuery
in the global scope. I'd like to implement something similar to jQuery's wrapper, but we should decide what the API should look like. For example, it could remain the same (ierequire('jquery-migrate')
) and bring jquery in as a formal dependency and patch that, but npm's file tree is not flat for the time being (this is going to change in 3.x), and we might end up patching a different jQuery than the user was expecting.An alternate API would be to use
require('jquery-migrate')(jQuery)
, passing in a reference to the desired jQuery to patch into a factory function. This would clear up the above issue but makes CommonJS somewhat more of a special case. Then there's the handling of a lack of awindow
object that jQuery handles, and there's a question of whether we should handle that too.I imagine jQuery plugins face these same issues, so I'd love to hear if you have any experience or thoughts on this.
Thanks!