code: function loadModules() {
    const nodeModulesPath = path.join(process.cwd(), plugin.config.modulesPath);
  
    return plugin.myrmex.fire('beforeNodeModulesLoad')
    .then(() => {
      // Retrieve paths of all node packages
      return Promise.promisify(fs.readdir)(nodeModulesPath);
    })
    .then(subdirs => {
      // Load all packages configurations
      const nodeModulePromises = [];
      _.forEach(subdirs, (subdir) => {
        const nodeModulePath = path.join(nodeModulesPath, subdir);
        // subdir is the name of the package, so we pass it as the second argument
        nodeModulePromises.push(loadNodeModule(nodeModulePath, subdir));
      });
      return Promise.all(nodeModulePromises);
    })
    .then(nodeModules => {
      // This event allows to inject code to add or delete or alter node modules configurations
      return plugin.myrmex.fire('afterNodeModulesLoad', nodeModules);
    })
    .spread(nodeModules => {
      return Promise.resolve(nodeModules);
    })
    .catch(e => {
      // In case the project does not have any node package yet, an exception will be thrown
      // We silently ignore it
      if (e.code === 'ENOENT' && path.basename(e.path) === 'modules') {
        return Promise.resolve([]);
      }
      return Promise.reject(e);
    });
  }
docs: Load all packages
  @return {Promise<[NodeModule]>} - promise of an array of node packages