astro-ghostcms/.pnpm-store/v3/files/68/55f3e62e7eb33f732747ed91ad4...

22 lines
610 B
Plaintext

import { dirname, resolve } from "path";
import { createSyncFn } from "synckit";
import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));
const compilerSync = createSyncFn(
resolve(__dirname, "./astrojs-compiler-worker-service.mjs"),
);
export function parse(...args) {
return compilerSync("parse", ...args);
}
export function transform(...args) {
return compilerSync("transform", ...args);
}
export function convertToTSX(...args) {
return compilerSync("convertToTSX", ...args);
}
export function compile(...args) {
return compilerSync("compile", ...args);
}