web: Check JS files. Add types.

This commit is contained in:
Teffen Ellis
2025-05-19 00:37:49 +02:00
committed by Teffen Ellis
parent 40f598f3f1
commit 92629578dd
4 changed files with 62 additions and 19 deletions

View File

@ -35,6 +35,11 @@ const __dirname = fileURLToPath(new URL(".", import.meta.url));
const projectRoot = path.join(__dirname, "..");
process.chdir(projectRoot);
/**
*
* @param {string[]} flags
* @returns
*/
const hasFlag = (flags) => process.argv.length > 1 && flags.includes(process.argv[2]);
const [configFile, files] = hasFlag(["-n", "--nightmare"])