Skip to content

Commit

Permalink
feat: add eta engine
Browse files Browse the repository at this point in the history
  • Loading branch information
beatyt committed Dec 28, 2023
1 parent 8113e17 commit 8dc6608
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/engines/src/components/EtaEngine.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {ViewEngine} from "../decorators/viewEngine";
import {Engine} from "./Engine";

@ViewEngine("eta", {
requires: "eta"
})
export class EtaEngine extends Engine {
protected $compile(template: string, options: any) {
const eta = this.engine;
return () => eta.renderString(template, options);
}
}

0 comments on commit 8dc6608

Please sign in to comment.