"Deema" stands for "deus-ex-machina" since it can resolve anything.
A utility to resolve most non-vanilla JS import paths
// tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": { "@/*": ["./*"] }
}
}
import { generateResolver } from "deema";
const resolve = generateResolver("/my/root/path");
resolve("src/component/main.ts", "@/shared/sum"); // "../shared/sum"
This repo is more of an experiment for now. We'll see if its concept become viable.