From 867fe30432eee95bf890bc3245210958a9b862d0 Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Thu, 19 Sep 2024 23:08:30 +0000 Subject: [PATCH] remove old vercel file this file is no longer needed and was left in a previous PR accidentally --- scripts/generate-vercel-config.mjs | 47 ------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 scripts/generate-vercel-config.mjs diff --git a/scripts/generate-vercel-config.mjs b/scripts/generate-vercel-config.mjs deleted file mode 100644 index ec39bfd..0000000 --- a/scripts/generate-vercel-config.mjs +++ /dev/null @@ -1,47 +0,0 @@ -import { getTransformedRoutes } from "@vercel/routing-utils"; -import * as url from "node:url"; -// TODO: dynamically generate rewrites based on libs.yaml & releases.yaml -const makeConfig = () => { - const { routes } = getTransformedRoutes({ - trailingSlash: true, - redirects: [ - { - source: "/cudf/", - destination: "/cudf/stable/", - statusCode: 301, - } - ], - rewrites: [ - { - source: "/cudf/stable/(.*)", - destination: "https://d1664dvumjb44w.cloudfront.net/cudf/html/24.02/$1", - }, - { - source: "/libcudf/stable/(.*)", - destination: - "https://d1664dvumjb44w.cloudfront.net/libcudf/html/24.02/$1", - }, - ], - }); - return { - version: 3, - routes: [ - ...routes, - { - handle: "error", - }, - { - status: 404, - src: "^.*$", - dest: "/404.html", - }, - ], - }; -} -if (import.meta.url.startsWith("file:")) { - const modulePath = url.fileURLToPath(import.meta.url); - if (process.argv[1] === modulePath) { - // Main ESM module - console.log(JSON.stringify(makeConfig(), null, 2)); - } -}