site specific flags

This commit is contained in:
velzie 2024-10-13 14:43:51 -04:00
parent 0906dd78a9
commit 920bbd8d69
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820
8 changed files with 34 additions and 11 deletions

View file

@ -1,10 +1,12 @@
import { flagEnabled } from "../../scramjet";
import { ScramjetClient } from "../client";
type Mapping = [string, number, number];
const sourcemaps: Record<string, Mapping[]> = {};
export const enabled = () => self.$scramjet.config.flags.sourcemaps;
export const enabled = (client: ScramjetClient) =>
flagEnabled("sourcemaps", client.url);
export default function (client: ScramjetClient, self: Self) {
// every script will push a sourcemap