Comparing version 2.0.1 to 2.0.2
@@ -14,2 +14,3 @@ "use strict"; | ||
const Renderer_1 = require("../Renderer"); | ||
const Context_1 = require("../Context"); | ||
class Edge { | ||
@@ -19,5 +20,6 @@ constructor(_options = {}) { | ||
this._globals = {}; | ||
this._tags = Object.assign({}, Tags); | ||
this._tags = {}; | ||
this.loader = this._options.loader || new Loader_1.Loader(); | ||
this.compiler = new Compiler_1.Compiler(this.loader, this._tags, !!this._options.cache); | ||
Object.keys(Tags).forEach((name) => this.registerTag(Tags[name])); | ||
} | ||
@@ -41,2 +43,5 @@ mount(diskName, dirPath) { | ||
registerTag(tag) { | ||
if (typeof (tag.run) === 'function') { | ||
tag.run(Context_1.Context); | ||
} | ||
this._tags[tag.tagName] = tag; | ||
@@ -43,0 +48,0 @@ return this; |
@@ -18,3 +18,3 @@ "use strict"; | ||
try { | ||
return requireUncached(presenterPath); | ||
return utils_1.esmResolver(requireUncached(presenterPath)); | ||
} | ||
@@ -21,0 +21,0 @@ catch (error) { |
{ | ||
"name": "edge.js", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Template engine", | ||
@@ -48,3 +48,3 @@ "main": "build/index.js", | ||
"np": "^5.1.0", | ||
"ts-node": "^8.3.0", | ||
"ts-node": "^8.4.1", | ||
"tslint": "^5.20.0", | ||
@@ -51,0 +51,0 @@ "tslint-eslint-rules": "^5.4.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52941
1081