@itrocks/template 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/template.js +3 -1
- package/package.json +2 -1
package/cjs/template.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Template = exports.HtmlResponse = exports.frontScripts = exports.depends = void 0;
|
|
4
4
|
exports.templateDependsOn = templateDependsOn;
|
|
5
5
|
const app_dir_1 = require("@itrocks/app-dir");
|
|
6
|
+
const class_type_1 = require("@itrocks/class-type");
|
|
6
7
|
const rename_1 = require("@itrocks/rename");
|
|
7
8
|
const sorted_array_1 = require("@itrocks/sorted-array");
|
|
8
9
|
const promises_1 = require("node:fs/promises");
|
|
@@ -209,7 +210,8 @@ class Template {
|
|
|
209
210
|
};
|
|
210
211
|
}
|
|
211
212
|
async include(path, data) {
|
|
212
|
-
const
|
|
213
|
+
const TemplateType = (0, class_type_1.constructorOf)(this);
|
|
214
|
+
const template = new TemplateType(data, this.blockStack[0]?.data);
|
|
213
215
|
template.addLinks = this.addLinks;
|
|
214
216
|
template.applicationPath = this.applicationPath;
|
|
215
217
|
template.doExpression = this.doExpression;
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@itrocks/app-dir": "latest",
|
|
8
|
+
"@itrocks/class-type": "latest",
|
|
8
9
|
"@itrocks/rename": "latest",
|
|
9
10
|
"@itrocks/sorted-array": "latest"
|
|
10
11
|
},
|
|
@@ -53,5 +54,5 @@
|
|
|
53
54
|
"build": "tsc",
|
|
54
55
|
"test": "npm run build && node --test --test-isolation=none test/*.test.js"
|
|
55
56
|
},
|
|
56
|
-
"version": "0.3.
|
|
57
|
+
"version": "0.3.2"
|
|
57
58
|
}
|