Skip to content

Commit

Permalink
chore(scripts): remove redundant export
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Mar 16, 2023
1 parent c02487f commit 931c586
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions scripts/license-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ const path = require("upath");
* @author Frazer Smith
* @description Check licenses of all direct production dependencies to
* ensure they are not copyleft.
* @param {object} options - Options object.
* @param {string} [options.start="__dirname/.."] - Path to start checking from.
*/
async function checkLicenses(
options = { start: path.joinSafe(__dirname, "..") }
) {
async function checkLicenses() {
console.log("Checking licenses of direct production dependencies...");

/**
Expand Down Expand Up @@ -57,7 +53,7 @@ async function checkLicenses(
const licenses = await init({
direct: true,
production: true,
start: options.start,
start: path.joinSafe(__dirname, ".."),
});

const copyLeftLicensesList = Object.keys(licenses).filter((license) =>
Expand All @@ -77,9 +73,4 @@ async function checkLicenses(
process.exit(0);
}

// If file called directly, then run function
if (require.main === module) {
checkLicenses();
}

module.exports = checkLicenses;
checkLicenses();

0 comments on commit 931c586

Please sign in to comment.