code: function walkTree(dirPath) {
      let filesindir = [];
      return new Promise((res, rej) => {
          if (dirPath.match(/node_modules|.git|bower|LICENCE|tree.json/)) {
              rej([]);
          }
  
          const relative = `${dirPath}/`,
              readPath = dirPath === '.' ? ROOT + '/' : dirPath + '/';
  
          readdir(path.resolve(readPath))
              .then(files => {
                  files.map(async(i) => {
                      let file;
                      if (fs.statSync(path.join(relative, i)).isDirectory()) {
                          file = {
                              name: i,
                              type: 'dir',
                              path: `${relative}${i}`,
                              files: {}
                          }
                      } else {
                          file = {
                              id: id,
                              name: i,
                              type: 'file',
                              path: `${relative}${i}`,
                              imports: [],
                              exports: []
                          }
                          AllFiles[id++] = file;
                      }
                      filesindir.push(file);
                  })
                  res(filesindir);
              })
              .catch(err => {
                  console.error(err);
                  rej([]);
              })
      })
  }
docs: @function walkTree - returns a sub tree for a directory
  
  @param {string} dirPath - path of the directory
  
  @returns {object}