From 7d936efb2f37db42c3e57ee9a915ed4d5ab8e25f Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sat, 27 Aug 2022 05:18:48 +0200 Subject: Cleanup, reformat, fix some todos, git hook fixup! Cleanup, reformat, fix some todos, git hook --- scripts/build.js | 10 +++++----- scripts/depclean.js | 2 ++ scripts/rights.js | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/build.js b/scripts/build.js index 704909ce..6cf4e818 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -29,7 +29,7 @@ if (silent) console.error = console.log = function () {}; if (argv.includes("clean")) { console.log(`[${++i}/${steps}] Cleaning...`); - let d = "dist"; + let d = "../" + "/dist"; if (fs.existsSync(d)) { fs.rmSync(d, { recursive: true }); if (verbose) console.log(`Deleted ${d}!`); @@ -110,7 +110,7 @@ if (!argv.includes("copyonly")) { } console.log(`[${++i}/${steps}] Copying plugin data...`); -let pluginFiles = walk(pluginDir).filter((x) => !x.endsWith(".ts")); -pluginFiles.forEach((x) => { - fs.copyFileSync(x, x.replace("src", "dist")); -}); +let pluginFiles = walk(pluginDir).filter(x=>!x.endsWith('.ts')); +pluginFiles.forEach(x=>{ + fs.copyFileSync(x, x.replace('src','dist')) +}) \ No newline at end of file diff --git a/scripts/depclean.js b/scripts/depclean.js index 5a402331..2d74f365 100644 --- a/scripts/depclean.js +++ b/scripts/depclean.js @@ -5,6 +5,8 @@ const { execSync } = require("child_process"); const { argv, stdout, exit } = require("process"); const { execIn, getLines } = require("./utils"); +const { execIn, getLines } = require("./utils"); + const bundleRequired = ["@ovos-media/ts-transform-paths"]; const removeModules = argv.includes("cleanup"); diff --git a/scripts/rights.js b/scripts/rights.js index 5ae576ef..a6d23855 100644 --- a/scripts/rights.js +++ b/scripts/rights.js @@ -12,7 +12,7 @@ let lines3 = lines2.filter((y) => y.includes(": BitFlag(")); let lines4 = lines3.map((x) => x.split("//")[0].trim()); function BitFlag(int) { - return 1n << BigInt(int); + return 1n << eval(`${int}n`); } let rights = []; -- cgit 1.5.1