async processFiles(targetDir, templateDir) {
    // const src = path.join(templateDir, 'boilerplate');
    const src = path.join(templateDir);
    const locals = {};
    const fsEditor = editor.create(memFs.create());
    const files = glob.sync('**/*', { cwd: src, dot: true, nodir: true });
    for (const file of files) {
      const from = path.join(src, file);
      const to = path.join(
        targetDir,
        this.replaceTemplate(this.fileMapping[file] || file, locals)
      );
      fsEditor.copy(from, to, {
        process: (content) => {
          log.info('write to:%s', to);
          return this.replaceTemplate(content, locals);
        },
      });
    }

    // write boilerplate base info to dist pkg info
    const tplPkgInfo = require(path.join(templateDir, 'package.json'));
    fsEditor.extendJSON(path.join(targetDir, 'package.json'), {
      boilerplate: {
        name: tplPkgInfo.name,
        version: tplPkgInfo.version,
        description: tplPkgInfo.description,
        repository: tplPkgInfo.repository,
        homepage: tplPkgInfo.homepage,
      },
    });

    // write file to disk
    await new Promise(resolve => fsEditor.commit(resolve));
    this.copyGitignore(targetDir);
    return files;
  }
copy boilerplate to target dir with template scope replace
@param {String} targetDir - target dir
@param {String} templateDir - template dir
@return {Array} file names