Skip to content

Commit 6dacd74

Browse files
authored
Merge pull request #44 from Ericarthurc/master
Fix eta view path
2 parents 4eadf3c + 3d096c9 commit 6dacd74

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export * as path from "https://deno.land/std@0.131.0/path/mod.ts";
55
export { green, blue } from "https://deno.land/std@0.131.0/fmt/colors.ts";
66
export { assertEquals, assert } from "https://deno.land/std@0.131.0/testing/asserts.ts";
77

8-
export { Application } from "https://deno.land/x/oak@v10.5.1/mod.ts";
8+
export { Application } from "https://deno.land/x/oak@v10.6.0/mod.ts";
99

1010

1111
export * as eta from 'https://deno.land/x/eta@v1.12.3/mod.ts'

lib/adapters/oak/oak.adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import type {
22
Context,
33
RouteParams,
44
State,
5-
} from "https://deno.land/x/oak@v10.5.1/mod.ts";
5+
} from "https://deno.land/x/oak@v10.6.0/mod.ts";
66

77
import type { ViewConfig,Adapter,Engine } from "../../viewEngine.type.ts";
88
import { getTemplate } from "./oak.utils.ts";
99

10-
declare module "https://deno.land/x/oak@v10.5.1/mod.ts" {
10+
declare module "https://deno.land/x/oak@v10.6.0/mod.ts" {
1111
// App level Context
1212
interface Context {
1313
render: (fileName: string, data?: object) => void;

lib/engines/eta/eta.engine.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ export const etaEngine: Engine = async (
88
filename: string = ""
99
): Promise<string> => {
1010

11+
if (config.viewRoot) {
12+
eta.configure({ views: config.viewRoot });
13+
}
14+
1115
return new Promise<string>(async (resolve, reject) => {
1216
try{
1317
const result = await eta.render( template, data) as string

0 commit comments

Comments
 (0)