From 1528703ed98a7ce8ab6c259eb9bd0cec8911b84f Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Wed, 26 Mar 2025 09:26:22 +0100 Subject: [PATCH] build(cleanupNodeModules): add some minimalistic logging --- bin/cleanupNodeModules.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/cleanupNodeModules.ts b/bin/cleanupNodeModules.ts index 2885f1484..e20004747 100644 --- a/bin/cleanupNodeModules.ts +++ b/bin/cleanupNodeModules.ts @@ -1,6 +1,12 @@ import fs from "fs-extra"; import path from "path"; +/** + * Example usage with node >= v22: + * node --experimental-strip-types bin/cleanupNodeModules.ts /path/to/build/folder + * Example usage with tsx: + * tsx bin/cleanupNodeModules.ts /path/to/build/folder + */ function main() { if (process.argv.length !== 3) { console.error("More than one path was supplied as argument. Aborting."); @@ -13,8 +19,9 @@ function main() { console.error(`Supplied path '${basePath}' does not exist. Aborting.`) process.exit(1); } - + console.log(`Starting node_modules pruning in '${basePath}'...`) cleanupNodeModules(basePath); + console.log("Successfully pruned node_modules.") } function cleanupNodeModules(basePath: string) {