function constructSingleLevel(jsxPath) {
  let reactObj = {};
  // fileContent stores the file at the jsxPath
  const fileContent = fs.readFileSync(jsxPath, { encoding: 'utf-8' });
  //jsonObj uses flowParser to turn the file into an AST
  let jsonObj = flowParser.parse(fileContent);
  // checks for Components in imports section  
  let imports = grabImportNameAndPath(jsonObj);
  let componentTags = grabChildComponents(imports, fileContent);
  // checks if component is Stateful and grabs state;
  let state = grabState(jsonObj);
  // iterates through components array and creates object with Component name, props and path;
  if (componentTags !== null){
    componentTags.forEach(elem => {
      let ast = flowParser.parse(elem).body[0].expression
      reactObj = Object.assign(reactObj, constructComponentProps(ast));
    });
    imports = imports.filter(comp => {
        comp.props = reactObj[comp.name]
        return Object.keys(reactObj).includes(comp.name);
    });
  } else {
    imports = [];
  }
  let outputObj = {
    name: path.basename(jsxPath).split('.')[0],
    childProps: imports,
    stateProps: state,
    children: []
  }
  return outputObj;
}
returns Object with name and props of current Component;
@param {String} jsxPath - Path of file to convert into a AST object