It seems like JS could use some sort of working group to address these types of issues, such as PHP with the FIG[2] (Framework Interoperability Group); not sure if CommonJS is it, or could be...
I hope there will be less arguments of "...but standards are bad..." this time around.
JS community is maturing to the point where they do need to stop reinventing the wheel.
Occasionally there are developers who just love to write more code and churn stuffs out cuz you know.. that's what rockstars do :) (and make a name for themselves).
Python -> pip, Ruby -> gem, (more but I'm lazy.) These are good things. They make our lives so much better.
I love jQuery, but modules tend to be overdoing it on the configuration/options side. Keep things lean and orchestrate.
To register and publish your plugin, you’ll need to push your code to a public repository on GitHub, and add our post-recieve webhook URL (http://plugins.jquery.com/postreceive-hook) to your repository. The next time you push a semver tag, we’ll take care of registering the plugin name and updating its page on the site. When you’re ready to release the next version of your plugin, just tag and push again!
I'm curious how exactly they're doing this.
I created a similar site (but for all javascript plugins, not just jQuery), called http://jspkg.com. I built Github-import integration to add new projects from Github, and I wanted to do the same "automatically update when you push a new version tag" functionality, but Github doesn't fire the post-receive hook when you push tags, only when you push commits. It used to say that in the "When hooks are fired" section of the help page [1], but they've since updated that page to say almost nothing at all. I had also talked with a couple Github folks at the time, who confirmed this was the case, and that it'd cause problems for this exact use-case.
I started thinking of a few workarounds, but never settled on any of them, as none of them seemed like they'd work just right...
One workaround I thought of was to post to jspkg when the post-receive hook is fired, and allow jspkg to poll the git repo for the next couple minutes to see if it finds any new tags within that window. This seems like an ugly hack to me (not to mention, it would add a lot of unnecessary work on the server's end), and would still not be totally effective, if you waited longer than the window to push your new tags to github. I'm guessing it'd work fine the majority of the time, but as a developer, it wouldn't make my life that much easier if I still had to check jspkg.com every time just to make sure it worked.
So, then I started thinking of another option. Perhaps, instead of importing tags directly, maybe I have a post-receive hook that just looks to see if the package.json was modified, and if so, see if the version was bumped. And if it was, import that snapshot of the master branch. The issue with this is that you can't use the post-receive if you don't have a package.json (though maybe that's not entirely a bad thing). It also means that it might create snapshots when you don't expect. For example, if I change my package.json and then do a couple more commits and then tag the release, the distribution on jspkg will be from when the package.json was updated, not when the tag was created.
Another option I was considering is just writing a really simple git hook (not a github hook) that uses jspkg's restful api to upload a zip file from the users machine when they create a new version tag. Then it wouldn't rely on github even, but it would require the user to install the commit hook locally.
At any rate, I guess I'll have to check out the source code for the plugin registry to see what they settled on.
[1]: https://github.com/jquery/plugins.jquery.com/blob/master/lib...
https://github.com/jbrooksuk/jQueryLocalStorage/commit/4eca4...