You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfs=require("fs");constpath=require("path");constchildProcess=require("child_process");asyncfunctiondepnote(packageManager,keyword){// Ler o arquivo "package.json" do projetoconstpackageJson=JSON.parse(fs.readFileSync(path.resolve(process.cwd(),"package.json"),"utf8"));// Filtrar as dependências pelo keyword fornecidoconstdependencies=Object.keys(packageJson.dependencies).filter((dependency)=>dependency.includes(keyword));// Remover cada dependência filtrada usando o gerenciador de pacotes fornecidofor(constdependencyofdependencies){console.log(`Removing dependency: ${dependency}`);awaitchildProcess.execSync(`${packageManager} remove ${dependency}`,{stdio: "inherit",});}console.log("Done!");}// Exemplo de uso: remover todas as dependências que contenham a palavra "test" usando o npmdepnote("npm","test");
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: