@wxn0brp/falcon-frame 0.5.1 → 0.5.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.
Files changed (2) hide show
  1. package/dist/render.js +6 -1
  2. package/package.json +1 -1
package/dist/render.js CHANGED
@@ -3,8 +3,13 @@ import path from "path";
3
3
  export function renderHTML(templatePath, data, renderedPaths = [], FF) {
4
4
  try {
5
5
  const realPath = path.resolve(templatePath);
6
- if (renderedPaths.includes(realPath)) {
6
+ if (renderedPaths.includes(realPath))
7
7
  return `<!-- Circular dependency detected: tried to render ${templatePath} again -->`;
8
+ if (FF && FF.vars["render data"]) {
9
+ data = {
10
+ ...FF.vars["render data"],
11
+ ...data,
12
+ };
8
13
  }
9
14
  let template = fs.readFileSync(templatePath, "utf8");
10
15
  // Inserting data, e.g. {{name}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wxn0brp/falcon-frame",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "wxn0brP",