Why only one JS file per resource

Plone 5 introduced the concept of resources containing one JS file and multiple CSS files.
Why is a resource limited to one JS file only? What is the deeper meaning of "Main JavaScript file" (Resource registry control panel)? In my add-ons I often have one JS file containing my own JS code and possible one or more 3rd party jQuery modules with their own JS "main" modules....what is the general approach here?
Should I build dedicated resources for my own JS module and dedicated resources for each 3rd party add-on?
Remains the question why only one JS main file per resource? E.g. DataTables.net has one JS file (fine) but I often want to include further JS files (for plugins and translations). I still could not get an official and working solution to these questions during the #ploneconf.

-aj

The reason is because it is designed to work with JavaScript dependency management.

If you were able to have multiple files defined, you can not require the module in your other javascript modules.

You're fine only using bundles and building it outside of plone using the various availble JS build tools.

What we were aiming to do is provide a way for people to do some dev with dependency management that is compatible with the way plone js/css itself is built and then be customizable TTW. Much of JS dev these days involves compilers and build tools that are not particularly well suited for the way plone historically likes to do everything TTW.

I would suggest if you want to use dependency management and understand that way of developing, use it. If you just want to do the old way of jQuery js dev, including a sequential list of JS files and running something on dom loaded event, you might just be better off using the legacy type bundle.

The legacy bundle approach is either buggy or not working (there are/were some issues that I filled on Github) but I don't see any way to get this working using the legacy bundle approach. So let's talk about the new way how to do it. As integrator and backend developer I am clearly missing the big picture or a reasonable documentation or example for including my own resources and third party resources in a straight forward way. I also noticed that it is not feasible to touch or modify any of the existing third-party packages that are used for a particular add-on. Or is really so hard moving an existing code base with arbitrary CSS and JS resources to Plone 5.

Andreas

Another try: I hoped that this set of resources and dedicated bundle would work in reality:

Without the compile=False directive I can see the bundle inside the resource registry. Clicking on "Build" causes the common problem that the build process does not terminate (spinning wheel spinning forever, tested on Chrome Linux and Mac).

I am really completely stuck and have no further clue where the problem is.

-aj

With an updated registry.xml

I am running into another issue (same as documented here):

http://docs.plone.org/adapt-and-extend/theming/resourceregistry.html#id15

...likely because ace.js calls require.js itself (not an expert here).

So how can one get out of this hell?