Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery new github plugin system

I have followed all the steps at the plugins.jquery.com repo on github (https://github.com/jquery/plugins.jquery.com/) to be ready to add my plugin to the new system, I have a plugin called Tweetslider in the old repository, but I am confused.

I have set up the local jquery sites using /etc/hosts to route it to my ip, and set up all the node.js functionality. I assumed that publishing a plugin would be done via the wp-admin of the local site, but it seems this is not the case.

The more I read, the more it seems that I simply add a jquery.json manifest file in the root of my repository, add the post-receive-hook in github to the plugins site receiving url, and post a new tag with the version number, which will then be picked up by jquery plugins site and added. If this is the case, why did I bother with the web-base-template etc and all the setting up of the local plugins db etc?

My repository for tweetslider is here https://github.com/LiamBailey/TweetSlider

If I follow the steps above would my plugin be added or re-added provided the manifest was valid, or am I missing something?

For example at the end of the readme on the jquery repo linked at top of post it gives as the final instruction:

Running the site

node scripts/manager.js

But when I run this it does absolutely nothing. I have checked the sysmonitor and a node applet is in there, but I can't see anything visually happening. I have looked at the code but I don't get that either. All the Wordpress stuff is perfect, I have the local jQUery and I can login. I hope someone else has looked at all this and made a better understanding of it than I, as I think I will go crazy soon.

like image 880
Liam Bailey Avatar asked Oct 13 '12 14:10

Liam Bailey


2 Answers

Yeah, this drove me crazy too. The key thing is that github can not know about your /etc/hosts and can not know about your local server.

  • The web-base-template and wordpress stuff is so you can view the site.

  • The node server receives the post-receive-hook and then adds the info directly into wordpress.

  • Changing /etc/hosts sets up a domain name so you can view the local wordpress site however no one else can see this, in particular github.

Some potential workarounds:

  • Setup a local git server which has a post-receive-hook to your local machine. This way all the necessary hostname routing is handled with your local /etc/hosts.

  • Use some sort of dynamic DNS or related system to have a public hostname that directs to your localy running server and have github hook into that.

  • Proxy the post-receive-hook through your own personal public server to your local server.

You could also ask the people on the jquery forums if they have any more insight into configuring a local environment.

like image 187
Nal Avatar answered Oct 10 '22 23:10

Nal


Update 2013-01-17

The jQuery Plugins Registry is finally up! http://plugins.jquery.com

The instructions are pretty straigtforward now, http://plugins.jquery.com/docs/publish/

And the specifications for the manifest are also clearly detailed at http://plugins.jquery.com/docs/package-manifest/


If I follow the steps above would my plugin be added or re-added provided the manifest was valid, or am I missing something?

According to the README.md, it warns that it is not working yet. This system is under (slow) development.

Simply add a post-receive hook to your repository with our web hook url, http://plugins.jquery.com/_update. Warning: This is not yet functional!

Also I noticed the last commit made a month ago was about updating said post-receive hook to http://plugins.jquery.com/postreceive-hook in their docs on publishing at https://github.com/jquery/plugins.jquery.com/blob/4f5f611d247db6b3df11a2a5bda0957d08f11d6f/site-content/page/docs/publish.html

Things like that kind of add to the confusion but you could try asking and/or looking in https://github.com/jquery/plugins.jquery.com/issues

like image 22
Anthony Hatzopoulos Avatar answered Oct 11 '22 00:10

Anthony Hatzopoulos