feat(consts): move constants from toml into module

This commit is contained in:
Erica Marigold 2024-06-21 12:36:45 +05:30
parent 212a249c36
commit a5ed0c9fb8
No known key found for this signature in database
GPG key ID: 2768CC0C23D245D1
2 changed files with 5 additions and 15 deletions

View file

@ -1,3 +0,0 @@
name = "lune"
version = "0.8.5"
api_url = "https://api.github.com/repos/lune-org/lune/releases"

View file

@ -1,12 +1,5 @@
import { parse as parseToml } from "jsr:@std/toml";
import * as path from "jsr:@std/path";
export const BASE_PATH = path.dirname(path.fromFileUrl(import.meta.url));
export default parseToml(
Deno.readTextFileSync(path.join(BASE_PATH, "consts.toml")),
) as {
name: string;
api_url: string;
version: string;
};
export default {
name: "lune",
version: "0.8.5",
api_url: "https://api.github.com/repos/lune-org/lune/releases"
} as const;