docs: function bundleDTS() {
      const DST_PATH = path.join(__dirname, '..', config.dir.pkg);
      const TYPE_DEF_FILE = path.join(DST_PATH, config.dir.types, config.main.bundle_d_ts);
      const SRC_DEF_FILE = path.join(__dirname, '..', config.dir.built, config.main.basename + '-all.d.ts');
  
      let src = '\ufeff' + banner('.d.ts', config.main.basename) + fs.readFileSync(SRC_DEF_FILE).toString()
              .replace(/^\ufeff/gm, '')
              .replace(/\r\n/gm, '\n')
      ;
  
      const refPathInfo = [];
      const refPathDefs = src.match(/<reference path="[\s\S]*?"/g);
  
      if (null != refPathDefs) {
          refPathDefs.forEach((refpath) => {
              const filePath = refpath.match(/("|')[\s\S]*?("|')/)[0].replace(/("|')/g, '');
              const fileName = path.basename(filePath);
              refPathInfo.push({
                  refpath: refpath,
                  path: filePath,
                  file: fileName,
              });
          });
          refPathInfo.forEach((target) => {
              src = src.replace(target.refpath, '<reference path="' + target.file + '"');
          });
          // remove '_dev.dependencies.d.ts' reference.
          src = src.replace(/\/\/\/ <reference path="_dev.dependencies.d.ts"[\s\S]*?\n/g, '');
      }
  
      if (!fs.existsSync(path.join(DST_PATH, config.dir.types))) {
          fs.mkdirSync(path.join(DST_PATH, config.dir.types));
      }
      fs.writeFileSync(TYPE_DEF_FILE, src);
  }