1 2 3 4 5 6 7 8 9 10
"use strict"; var fs = require("fs"); var vm = require("vm"); var fileContent = fs.readFileSync(__dirname + "/../../components.js", "utf8"); var context = {}; vm.runInNewContext(fileContent, context); module.exports = context.components;