Something went wrong. Try again.
Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233#!/usr/bin/env nodeimport { readdir, rm } from "node:fs/promises";import { join } from "node:path";
async function removeTargets(directory) { const entries = await readdir(directory, { withFileTypes: true }); await Promise.all( entries.map(async (entry) => { const fullPath = join(directory, entry.name); if (entry.isDirectory()) { if (entry.name === "node_modules" || entry.name === ".next") { await rm(fullPath, { force: true, recursive: true }); console.log(`Deleted ${fullPath}`); } else { await removeTargets(fullPath); } } else if ( entry.name === "pnpm-lock.yaml" || entry.name === "tsconfig.tsbuildinfo" ) { await rm(fullPath, { force: true }); console.log(`Deleted ${fullPath}`); } }) );}
console.log( "Deleting all node_modules and pnpm-lock.yaml files recursively \ud83d\uddd1");await removeTargets(process.cwd());console.log("node_modules and pnpm-lock.yaml files deleted \ud83c\udf89");