Comparing version 0.0.3 to 0.0.4
@@ -29,4 +29,6 @@ module.exports = { | ||
let parseVars = require("./../lib/parseVars") | ||
try { | ||
importFile = require(process.cwd() + "/" + attributes.src); //Import the component. | ||
importFile = require(process.cwd() + "/" + parseVars(attributes.src, data, blb)); //Import the component. | ||
} catch (e) { | ||
@@ -33,0 +35,0 @@ throw new Error("" + attributes.src + " is not a valid component path."); //Throw an error if the path is not valid. |
@@ -20,4 +20,6 @@ module.exports = { | ||
let fs = require("fs"); | ||
let src = attributes.src; | ||
let parseVars = require("./../lib/parseVars") | ||
let src = parseVars(attributes.src, data, blb); | ||
//remove html extention from src | ||
@@ -24,0 +26,0 @@ if (src.endsWith(".html")) { |
{ | ||
"name": "feat.js", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -11,3 +11,3 @@ let express = require('express'); | ||
app.get('/', function (req, res) { | ||
res.render('/test/pages/index', { email, posts }); | ||
res.render('/test/pages/index', { email, posts, fn: "header.html" }); | ||
}); | ||
@@ -14,0 +14,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
86454
779