4

Why jQuery plugins have their own manifest .jquery.json file rather than taking advantage on npm and its package.json one?

It appears to me that big deals seem to be: dependencies management and hosting files which npmjs.org already deals very well with...

Does anyone aware of this?

PS: jQuery is since recently officially published as commonJS module on npm: https://npmjs.org/package/jquery

2 Answers 2

2
+200

Ok after digging around a bit, and experiencing the same woes that you are describing. I believe this is what you are after:

Jquery boilerplate is a template for your jquery-plugin module layout. It includes both a package.json file for your npm repository publishing, and it includes a package.jquery.json file for uploading modules to the jquery module registry.

As for the answer that you really want. You are not going to get it... today. You could see that these package systems are written by different people at different times and solve the same problem. Thus the redundancy.

i.e. node.js and thus npm is a tidal wave that is coming in the community. However it is not the only way for you to use javascript pacakges and thus not the holy-grail of javascript package delivery... yet... Which is why jquery plugins registry needs to exist... today..

I feel compelled to point out that the npm repository is for javascript packages, where the as jquery packages one is just for jquery packages.

Finally: You can see for example that maintainers is a attribute that jquery plugin registry is using in the community that node plugins is not using. ( there are some other attribute differences ) see:

Your question: does illustrate a valid point tho. There is redundancy in these two package repositories. Jquery packages should just use the package.json file format for its imports.

Sign up to request clarification or add additional context in comments.

2 Comments

One thing I still don't get: when you write a plugin and want to publish it, do you npm publish it?
You will need to publish your plugin twice, if you want it to appear in both package repositories. Once to npm with npm-publish, and you will need to follow these jquery plugins registry instructions to get it into the jquery plugins site. I would clone the github jquery-boilerplate archive and simply rename it to your plugin. Replacing the contents with the code and meta information relative to your package. At that point following the instructions to get into both package repositories should be straight forward.
0

If I'm not mistaken, it's required by jQuery own repository which is in fact, plugins.jquery.com as well as npm and whatever else.

hope that it will be centralized to single repo someday.

some info about it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.