MCPcopy Create free account
hub / github.com/AntonPalmqvist/physically-based-api / main

Function main

scripts/pre-commit.mjs:29–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28// Only process files passed as arguments (from lint-staged)
29async function main() {
30 const args = process.argv.slice(2);
31 const stagedFlag = args.includes("--staged");
32 const filePaths = args.filter((arg) => !arg.startsWith("--"));
33
34 if (stagedFlag && filePaths.length > 0) {
35 for (const file of filePaths) {
36 await updateDatabaseVersion(file);
37 }
38 } else {
39 console.log("No staged files to process or --staged flag not set.");
40 }
41}
42
43main();

Callers 1

pre-commit.mjsFile · 0.70

Calls 1

updateDatabaseVersionFunction · 0.85

Tested by

no test coverage detected