4

I suppose it is for the simplicity of installation and distribution that mercury is bundled together with third party libraries in the same .js file.

This is good for small projects i guess, that will not have many dependencies to third party libraries, but I don't feel comfortable bundling a bunch of jquery UI plugins together with its own version of jquery along with the mercury code.

Is there a way to create a distribution that does not include these libraries, so that the developer takes care personally about delivering the needed dependencies?

This is all in an effort to create a grails plugin that will include mercury, much the same way as you do it in rails.

Luis Muñiz
  • 4,649
  • 1
  • 27
  • 43

1 Answers1

0

I'm assuming that you mean to ask if it's possible to have the javascript code and other client-side assets from the mercury project be distributed as part of a plugin, but not the dependencies that mercury includes in it's repository (tsk, tsk).

You're best bet is likely to simply copy over the files into a new project (looks like you have one) and leave out the jQuery (and any other) dependencies. You can safely depend on these resources by declaring them in your BuildConfig.groovy as plugins. This means that the jQuery plugin will be installed automatically when they install your plugin (unless they already have it installed).

You'll also probably want to look into integrating with the resources plugin, in order to deliver your javascript and images in an optimized way, and easy for plugin consumers to use.

Nathan
  • 325
  • 1
  • 2
  • 10