DI-Compiler (The compiler for DI)

Installation
Simply do: npm install @wessberg/di-compiler
.
Usage
import {DiCompilerBase} from "@wessberg/di-compiler";
const compiler = new DiCompilerBase();
const compiled = compiler.compile({
file: "a_file.ts",
code: `class Foo implements IFoo {}
DIContainer.registerSingleton<IFoo, Foo>();`
});
compiled.code;
compiled.hasChanged;
compiled.map
If you are using Rollup, then use rollup-plugin-di to compile your code automatically as part of your bundle, rather than using this compiler.