Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2149

Support JavaScript aggregation of modules, not just libraries

    Details

      Description

      One of the last major hurdles is to support aggregation of AMD modules; this would imply that the modules become part of a JavaScriptStack.

      There are definitely some challenges to this; primarily the need to rewrite the JavaScript slightly:

      define(["dep1", "dep2", "dep3"], function(dep1, dep2, dep3)

      { ... });

      needs to be rewitten to:

      define("my/module/name", ["dep1", "dep2", "dep3", function(dep1, dep2, dep3) { ... }

      );

      This can probably be accomplished using a regular expression.

      RequireJS's r.js utility is powerful; part of its job is to automatically hunt down transitive dependencies from a root namespace. I don't know if we can effectively duplicate that; because of issues such as CoffeeScript vs. JavaScript (vs. other languages), the fact that certain modules are created at runtime, and other factors ... we may need to the user to supply a list of which modules should be included, and the others will be fetched on-demand.

        Attachments

          Activity

            People

            • Assignee:
              hlship Howard M. Lewis Ship
              Reporter:
              hlship Howard M. Lewis Ship
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: