cli/schema.js
function createDir(dir) {
  const splitPath = dir.split('/');
  splitPath.reduce((path, subPath) => {
    let currentPath;
    if(subPath != '.'){
      currentPath = path + '/' + subPath;
      if (!fs.existsSync(currentPath)){
        fs.mkdirSync(currentPath);
      }
    }
    else{
      currentPath = subPath;
    }
    return currentPath
  }, '')
}
function createDir(dir) {
  const splitPath = dir.split('/');
  splitPath.reduce((path, subPath) => {
    let currentPath;
    if(subPath != '.'){
      currentPath = path + '/' + subPath;
      if (!fs.existsSync(currentPath)){
        fs.mkdirSync(currentPath);
      }
    }
    else{
      currentPath = subPath;
    }
    return currentPath
  }, '')
}
function createDir ( dir ) { const splitPath = dir . split ( '/' ) ; splitPath . reduce ( ( path , subPath ) => { let currentPath ; if ( subPath != '.' ) { currentPath = path + '/' + subPath ; if ( ! fs . existsSync ( currentPath ) ) { fs . mkdirSync ( currentPath ) ; } } else { currentPath = subPath ; } return currentPath } , '' ) }
recursive directory creation
recursive directory creation