twifeur/lib/utils.ts
2024-05-29 06:09:50 +02:00

14 lines
424 B
TypeScript

import { dirname } from "https://deno.land/std@0.224.0/path/dirname.ts";
import { CSSProperties } from "https://deno.land/std@0.40.0/types/react.d.ts";
export function _css(prop: CSSProperties) {
return prop;
}
export function project_root() {
const this_url = new URL(import.meta.url);
const this_abs_path = Deno.realPathSync(this_url.pathname);
const lib_path = dirname(this_abs_path);
return dirname(lib_path);
}