mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 23:48:15 -07:00
Use const lib = require('../methods/lib')(); for fresh imports
This commit is contained in:
parent
7bfa40b1f9
commit
3042b35800
87 changed files with 87 additions and 87 deletions
|
|
@ -26,7 +26,7 @@ folders.forEach((folder) => {
|
|||
for (let i = 0; i < files.length; i += 1) {
|
||||
let read = fs.readFileSync(`${folder}/${files[i]}`).toString();
|
||||
|
||||
const importDefaultValues = 'const lib = require(\'../methods/library\');';
|
||||
const importDefaultValues = `const lib = require('../methods/lib')();`;
|
||||
if (!read.includes(importDefaultValues)) {
|
||||
console.log(`Plugin error: '${folder}/${files[i]}' does not contain ${importDefaultValues}`);
|
||||
read = `${importDefaultValues}\n${read}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue