function copyAndReplaceImagesPath()

in tools/image-copy.js [46:61]


function copyAndReplaceImagesPath() {
  const newVersion = VERSION[0];
  const newVersionedDir = resolveVersionedImageDir(newVersion);
  const newVersionedZHDir = resolveVersionedZHImageDir(newVersion);
  // copy static images to versioned directory
  copySync(PROJECT_SITE_IMG_DIR, path.resolve(newVersionedDir, IMAGEDIR), {});
  copySync(
    PROJECT_SITE_ZH_IMG_DIR,
    path.resolve(newVersionedZHDir, IMAGEDIR),
    {}
  );

  // replace images path in versioned docs
  // replaceImagesPath(newVersionedDir, `${IMAGEDIR}`, "/image_en");
  // replaceImagesPath(newVersionedZHDir, `${IMAGEDIR}`, "/image_zh");
}