-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
34 lines (29 loc) · 825 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { inject } from "@vercel/analytics";
import "/src/Elements/Prism";
import Prism from "prismjs";
import "prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.js";
import "prismjs/components/prism-elm";
Prism.plugins.NormalizeWhitespace.setDefaults({
"remove-trailing": true,
"remove-indent": true,
"left-trim": true,
"right-trim": true,
"break-lines": 110,
});
type ElmPagesInit = {
load: (elmLoaded: Promise<unknown>) => Promise<void>;
flags: unknown;
};
const config: ElmPagesInit = {
load: async function (elmLoaded) {
await elmLoaded;
inject({
mode:
window.location.host == "elmforreactdevs.com" ? "production" : "dev",
});
},
flags: function () {
return "You can decode this in Shared.elm using Json.Decode.string!";
},
};
export default config;