sodal-project / cartographer

Cartographer version 1 is a complete rewrite adding the concept of modules.
1 stars 0 forks source link

Install Module #23

Open tbenbow opened 1 month ago

tbenbow commented 1 month ago

Modules will be installed from github. When this happens we also need to install their dependencies. We will probably need the following core functions...

/**
 * isModuleInstalled
 * Check if module is installed by verifying the module directory exists and contains at
 * least one file. If a module has a package.json file confirm that that the node_modules
 * directory exists and contains at least one file.
 * 
 * This is not a foolproof method of checking if a module is installed.
 * 
 * @param {string} module
 * @returns {boolean}
 */

/**
 * installModule
 * This function will install a module from gitHub.
 * 
 * @param {string} moduleUrl
 * @returns {boolean}
 */

/**
 * installModuleDependencies
 * After a module is installed this will install dependencies from it's package file.
 * 
 * @param {string} module
 * @returns {boolean}
 */