Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 640 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 640 Bytes

Deema

"Deema" stands for "deus-ex-machina" since it can resolve anything.

A utility to resolve most non-vanilla JS import paths

Usage

// 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.