主权项 |
1. A computer program product for retrieving a nested resource of software modules, the computer program product comprising a non-transitory computer readable storage medium having program code embodied therewith, the program code readable and executable by one or more processors to perform a method comprising:
identifying dependent software modules that are required by a software module; consolidating the software module with the dependent software modules to generate an aggregated software module, wherein the aggregated software module is a nested resource of software modules; transmitting, from a client-side module loader to a module server, a request for the aggregated software module, wherein the client-side module loader is incapable of identifying a name of received software modules from the module server, and wherein the module server is blocked from returning additional software modules in response to a request for a particular module; receiving, by the client-side module loader, a requested aggregated software module, wherein the requested aggregated software module has no identification; utilizing, by the client-side module loader, asynchronous module definition (AMD) specification commands to define and consolidate the software module with the dependent software modules to generate the aggregated software module, wherein the AMD specification commands comprise a “define” command to identify the dependent software modules that are required by the software module, wherein the AMD specification commands further comprise a “require” command to consolidate the software module with the dependent software modules to generate the aggregated software module, wherein the module server recognizes the aggregated software module using AMD specification commands without any plugins, wherein a plugin is defined as an embellishment to an AMD specification that provides custom logic for loading a module using loader plugins, wherein the loader plugins delegate loading of the module to a default loader, wherein use of the loader plugins requires the loader plugins to be installed on both a client computer that is hosting the client-side module loader as well as the module server, and wherein use of the loader plugins requires use of a same programming language that has been loaded on both the client computer and the module server; removing white-space and comments from the aggregated software module; shortening variable names within the aggregated software module; parsing the aggregated software module into a tokenized form using a compiler, wherein parsing the aggregated software module creates a parsed Abstract Symbol Table (AST); utilizing the parsed AST to locate require functions in an AMD module; and expanding a list of required modules used by the aggregated software module, wherein require functions specify dependent software modules required to execute the software module, and wherein the list includes nested dependencies of modules within the list. |