Skip to content

Commit ea6bdda

Browse files
committed
cleanup
1 parent abec4be commit ea6bdda

File tree

9 files changed

+8
-79
lines changed

9 files changed

+8
-79
lines changed

next.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ const { ProvidePlugin } = webpack;
1515
const transpileModules = ["rescript"].concat(bsconfig["bs-dependencies"]);
1616

1717
const config = {
18-
output: process.env.BUILD_STATIC === "true" ? "export" : undefined,
18+
output: "export",
1919
pageExtensions: ["jsx", "js", "bs.js", "mdx", "mjs"],
2020
env: {
2121
ENV: process.env.NODE_ENV,
2222
VERSION_LATEST: process.env.VERSION_LATEST,
2323
VERSION_NEXT: process.env.VERSION_NEXT,
24-
VERCEL: process.env.VERCEL,
2524
},
2625
swcMinify: false,
2726
webpack: (config, options) => {

now.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

pages/api/revalidate.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Packages.res

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ let parsePkgs = data =>
563563
}
564564
})
565565

566-
let getStaticProps: Next.GetStaticProps.revalidate<props, unit> = async _ctx => {
566+
let getStaticProps: Next.GetStaticProps.t<props, unit> = async _ctx => {
567567
let baseUrl = "https://registry.npmjs.org/-/v1/search?text=keywords:rescript&size=250&maintenance=1.0&popularity=0.5&quality=0.9"
568568

569569
let (one, two, three) = await Promise.all3((
@@ -603,17 +603,12 @@ let getStaticProps: Next.GetStaticProps.revalidate<props, unit> = async _ctx =>
603603
->Node.Fs.readFileSync
604604
->JSON.parseExn
605605
->unsafeToUrlResource
606-
let props: props = {
607-
"packages": pkges,
608-
"unmaintained": unmaintained,
609-
"urlResources": urlResources,
610-
}
611606

612607
{
613-
"props": props,
614-
"revalidate": switch Node.Process.env->Dict.get("BUILD_STATIC") {
615-
| Some("true") => Nullable.undefined
616-
| _ => Nullable.make(43200)
608+
"props": {
609+
"packages": pkges,
610+
"unmaintained": unmaintained,
611+
"urlResources": urlResources,
617612
},
618613
}
619614
}

src/Packages.resi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ type props = {
2525

2626
let default: props => React.element
2727

28-
let getStaticProps: Next.GetStaticProps.revalidate<props, unit>
28+
let getStaticProps: Next.GetStaticProps.t<props, unit>

src/bindings/Next.res

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ module GetStaticProps = {
3131
}
3232

3333
type t<'props, 'params> = context<'props, 'params> => promise<{"props": 'props}>
34-
35-
type revalidate<'props, 'params> = context<'props, 'params> => promise<{
36-
"props": 'props,
37-
"revalidate": Nullable.t<int>,
38-
}>
3934
}
4035

4136
module GetStaticPaths = {

src/common/CompilerManagerHook.res

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ module LoadScript = {
3535
}
3636

3737
module CdnMeta = {
38-
let baseUrl = switch Node.Process.env->Dict.get("VERCEL") {
39-
| Some(_) => "https://cdn.rescript-lang.org"
40-
| None => "/playground-bundles"
41-
}
38+
let baseUrl = "/playground-bundles"
4239

4340
let getCompilerUrl = (version): string => `${baseUrl}/${Semver.toString(version)}/compiler.js`
4441

src/others/Revalidate.res

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/others/Revalidate.resi

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)