_mapFiles()

in lib/base-generator.js [36:45]


  _mapFiles(sourcePath, destinationPath, globOptions, customOptions) {
    const diskFiles = globby.sync(sourcePath, globOptions);
    return diskFiles.map(sourceFilePath => {
      const commonPath = utils.getCommonPath(sourcePath);
      const toFile = path.relative(commonPath, sourceFilePath);
      let destPath = path.join(destinationPath, toFile);
      destPath = !customOptions.preProcessPath ? destPath : customOptions.preProcessPath(destPath);
      return { sourceFilePath, destPath };
    });
  }