Interesting software stack running this registry: Wordpress on Apache/MySQL to serve the website and Node.js with SQLite to automatically add content using the Wordpress API. https://github.com/jquery/plugins.jquery.com
I would be interested to hear the rationale behind such a crazy tech stack.
Announcing the jQuery Plugin Registry
11–20 of 36 posts
Re: Announcing the jQuery Plugin Registry
#12Re: Announcing the jQuery Plugin Registry
#13Re: Announcing the jQuery Plugin Registry
#14What I hate, that most of the jQuery plugins have a huge lack of documentation. You select plugin and then spend next day trying to figure out how it's working. It's almost the same as dowloading random js file form random website and trying to use it. Looked through currently available repos, and half of them lack even simple plugin usage cases in repositories :)
Re: Announcing the jQuery Plugin Registry
#15Earlier quoted context omitted.
I would be interested to hear the rationale behind such a crazy tech stack.
Wordpress is good at serving essentially static content so that part seems reasonable. The jQuery team is good with JS so node makes sense for building backend services. The service itself is not complex and probably doesn't have huge scaling concerns. Essentially performs a git pull when triggered by a webhook.
Re: Announcing the jQuery Plugin Registry
#16What I hate, that most of the jQuery plugins have a huge lack of documentation. You select plugin and then spend next day trying to figure out how it's working. It's almost the same as dowloading random js file form random website and trying to use it. Looked through currently available repos, and half of them lack even simple plugin usage cases in repositories :)
Re: Announcing the jQuery Plugin Registry
#17To 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.
Re: Announcing the jQuery Plugin Registry
#18Another registry for Javascript files and another json package description. This is getting ridiculous, you guys (npm, component, bower, volo, ender, jam and now plugins.jquery) should get together and fix this mess.
Re: Announcing the jQuery Plugin Registry
#19Another registry for Javascript files and another json package description. This is getting ridiculous, you guys (npm, component, bower, volo, ender, jam and now plugins.jquery) should get together and fix this mess.
Python -> pip, Ruby -> gem, (more but I'm lazy.) These are good things. They make our lives so much better.
Re: Announcing the jQuery Plugin Registry
#20From the post: 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 a…
[1]: https://github.com/jquery/plugins.jquery.com/blob/master/lib...