lib/helpers/indexes.js
function componentExists(componentPath) {
  const existsInExtensions = fs.existsSync(path.resolve(EXTENSIONS_PATH, componentPath));
  const existsInWidgets = fs.existsSync(path.resolve(themes.getPath(), 'widgets', componentPath));

  return !(!existsInExtensions && !existsInWidgets);
}
function componentExists(componentPath) {
  const existsInExtensions = fs.existsSync(path.resolve(EXTENSIONS_PATH, componentPath));
  const existsInWidgets = fs.existsSync(path.resolve(themes.getPath(), 'widgets', componentPath));

  return !(!existsInExtensions && !existsInWidgets);
}
function componentExists ( componentPath ) { const existsInExtensions = fs . existsSync ( path . resolve ( EXTENSIONS_PATH , componentPath ) ) ; const existsInWidgets = fs . existsSync ( path . resolve ( themes . getPath ( ) , 'widgets' , componentPath ) ) ; return ! ( ! existsInExtensions && ! existsInWidgets ) ; }
Checks if the component exists.
@param {string} componentPath The component path.
@return {boolean}
Checks if the component exists .