Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrelbug committed Sep 1, 2020
1 parent 279c9cb commit 2fb89dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
18 changes: 7 additions & 11 deletions deno_dist/file-utils.ts
@@ -1,17 +1,16 @@
var fs = require("fs");
var path = require("path");
import { fs, path, readFileSync } from "./file-methods.ts";
var _BOM = /^\uFEFF/;

// express is set like: app.engine('html', require('eta').renderFile)

import EtaErr from "./err";
import Compile from "./compile";
import { getConfig } from "./config";
import EtaErr from "./err.ts";
import Compile from "./compile.ts";
import { getConfig } from "./config.ts";

/* TYPES */

import { EtaConfig, PartialConfig } from "./config";
import { TemplateFunction } from "./compile";
import { EtaConfig, PartialConfig } from "./config.ts";
import { TemplateFunction } from "./compile.ts";

interface PartialFileConfig extends PartialConfig {
filename: string;
Expand Down Expand Up @@ -99,10 +98,7 @@ function getPath(path: string, options: EtaConfig) {
}

function readFile(filePath: string) {
return fs
.readFileSync(filePath)
.toString()
.replace(_BOM, ""); // TODO: is replacing BOM's necessary?
return readFileSync(filePath).toString().replace(_BOM, ""); // TODO: is replacing BOM's necessary?
}

function loadFile(
Expand Down
10 changes: 5 additions & 5 deletions deno_dist/render.ts
@@ -1,11 +1,11 @@
import compile from "./compile";
import { getConfig } from "./config";
import compile from "./compile.ts";
import { getConfig } from "./config.ts";

/* TYPES */

import { EtaConfig, PartialConfig } from "./config";
import { TemplateFunction } from "./compile";
import { CallbackFn } from "./file-handlers";
import { EtaConfig, PartialConfig } from "./config.ts";
import { TemplateFunction } from "./compile.ts";
import { CallbackFn } from "./file-handlers.ts";

/* END TYPES */

Expand Down

0 comments on commit 2fb89dc

Please sign in to comment.