function constructComponentTree(filePath, rootPath) {
  // create object at current level;
  let result = constructSingleLevel(path.join(rootPath, filePath));
  // checks if current Object has children and traverses through children to create Object;
  if(result && Object.keys(result.childProps).length > 0){
    for(let childProp of result.childProps) {
      //creates new path for children components - if girootPath doesnt have an extension adds .js extension
      let fullPath = path.join(rootPath, childProp.path);
      let newRootPath = path.dirname(fullPath);
      let newFileName = path.basename(fullPath);
      let childPathSplit = newFileName.split('.');
      if (childPathSplit.length === 1)
        newFileName += '.js';
      let newFullPath = path.join(newRootPath, newFileName);
      //traverses through children 
      result.children.push(constructComponentTree(newFileName, newRootPath));
    }
  }  
  return result;
}
recursively traverses through all folders given from filePath and creates JSON Object;
@param {String} filePath Path to Component folder
@param {String} rootPath - name of File