isDirectory: async()

in build_scripts/src/utils.js [33:45]


  isDirectory: async (dirPath) => (await lstat(dirPath)).isDirectory(),

  copyFile: async (source, target) => {
    let targetFile = target;
    // If target is a directory a new file with the same name will be created
    if (existsSync(target)) {
      if (await utils.isDirectory(target)) {
        targetFile = path.join(target, path.basename(source));
      }
    }
    console.log(`Copy File : ${targetFile}`);
    return copyFile(source, targetFile);
  },