11 lines
221 B
JavaScript
11 lines
221 B
JavaScript
const fs = require('fs');
|
|
|
|
/**
|
|
* Import client-side script into the "global" var
|
|
* @param scriptPath
|
|
*/
|
|
module.exports = (scriptPath) => {
|
|
eval.call(global, fs.readFileSync(scriptPath, { encoding: 'UTF-8' }));
|
|
};
|
|
|