You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This file will automatically set the path in the Source\Assemblies\Directories.ts, to disable this, add this to the top of the file Assemblies\Constants\Directories.ts
* '// !DISABLE-AUTO-SELECT-DIR'
* It should instert this automatically the first time.
`// THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT\r\n// !DISABLE-AUTO-SELECT-DIR\r\nexport const __baseDirName = '${dir}';\r\nexport const __sslDirName = __baseDirName + '/SSL';\r\n`,
);
return;
}
let contents = fs.readFileSync(fileName, { encoding: 'utf-8' });
if (contents.includes('// !DISABLE-AUTO-SELECT-DIR')) {
console.log(
`The file ./Source/Assemblies/Directories.ts was forced to not select the current directory. Most likely because it's already been generated.`,
);
return;
}
const data = contents.match(/(["'])(?:(?=(\\?))\2.)*?\1/i);
contents = contents.replace(data[0], `'${dir}'`);
contents = `// THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT\r\n// !DISABLE-AUTO-SELECT-DIR\r\n${contents}`;