Function module module(object a_options) Executes the FCF module declaration

Since JS files are available on the server side and on the browser side, and at the same time the server monitors their changes, the framework uses its own mechanism for loading JS modules, which is implemented by this method.

JS module files are generated by plugins VSCodeFCFFramework, SublimeFCFPlugin or with the fcfmngr command:

$ fcfmngr create module [MODULE_NAME]
Source file fcf:fcf.js Namespace fcf Arguments: object a_options - The module description object.

string name -The path to the module file in FCF notation, which is also its name.

[string] dependencies - An array of module dependencies. These dependencies are loaded first and are available as arguments to the module function (module property), in the sequence specified in the array.

[string] lazy - An array of module dependencies that are loaded after the module is loaded. Access to the data of the modules specified in this parameter is carried out only through global variables. Used in case of cyclic module dependencies.

function module - A module function that should return the data of the module itself. The parameters are the data of the modules specified in the dependencies property.

Examples Example 1 An example of a JS file with a declared module fcf.module({ name: "fcfManagement:templates/pages/translations/files-tab.hooks.js", dependencies: ["fcf:NSystem/languages.js"], lazy: [], module: function(languages){ return { // // Object of hooks for programmatically populated arguments // hooksProgramableArgument: { // // @result Returns the value of an argument or a Promise object // "files": function(a_taskInfo){ return languages.getTranslationFiles(); } }, }; } });