{"id":25898517,"url":"https://github.com/canastro/remove-git-ignored","last_synced_at":"2025-03-03T00:19:04.550Z","repository":{"id":57353301,"uuid":"79025153","full_name":"canastro/remove-git-ignored","owner":"canastro","description":":tractor: Small library that finds all directories with a .gitignore file and removes all the ignored files. ","archived":false,"fork":false,"pushed_at":"2017-01-17T20:40:46.000Z","size":12,"stargazers_count":2,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T12:40:48.012Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canastro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-15T10:37:30.000Z","updated_at":"2022-03-20T04:59:08.000Z","dependencies_parsed_at":"2022-09-18T23:22:14.593Z","dependency_job_id":null,"html_url":"https://github.com/canastro/remove-git-ignored","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canastro%2Fremove-git-ignored","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canastro%2Fremove-git-ignored/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canastro%2Fremove-git-ignored/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canastro%2Fremove-git-ignored/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canastro","download_url":"https://codeload.github.com/canastro/remove-git-ignored/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587817,"owners_count":19986628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-03T00:19:03.934Z","updated_at":"2025-03-03T00:19:04.537Z","avatar_url":"https://github.com/canastro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build status](https://travis-ci.org/canastro/remove-git-ignored.svg?branch=master)\n[![npm version](https://badge.fury.io/js/remove-git-ignored.svg)](https://badge.fury.io/js/remove-git-ignored)\n[![codecov](https://codecov.io/gh/canastro/remove-git-ignored/branch/master/graph/badge.svg)](https://codecov.io/gh/canastro/remove-git-ignored)\n\n# remove-git-ignored\nSmall library that will find all `.gitignore` files from a `rootPath` folder and will delete all the ignored files.\n\n## Why?\nI had a lot of old projects that I didn't worked for a while and I was running out of free space on my disk. I ran a command that would delete all the `node_modules` folders in a given rootPath and I \"instantly\" gained 20GB of free disk.\n\nAfter that I thought I should have a better way to deal with this and started creating a electron application to manage my workspace, and created a few of core modules to support it, such as:\n* [query-paths](https://github.com/canastro/query-paths)\n* [remove-git-ignored](https://github.com/canastro/remove-git-ignored)\n* [bulk-run-nsp](https://github.com/canastro/bulk-run-nsp)\n\n## How it works?\nThis module uses [query-paths](https://github.com/canastro/query-paths) to recursively find all the folders with a .gitignore. Then it reads all these files and deletes all files that match what you have defined in it.\n\n## Demo\n[![asciicast](https://asciinema.org/a/3p1wtf72uqon9zyc7kwtdmue0.png)](https://asciinema.org/a/3p1wtf72uqon9zyc7kwtdmue0)\n\n## Usage\n### As cli\n```js\n\u003e npm i -g remove-git-ignored\n\n# Go to the desired root folder\n\u003e remove-git-ignored\n```\n\n### As a node module\n```js\nconst removeGitIgnored = require('remove-git-ignored');\nconst remove = removeGitIgnored({\n    rootPath: '/Users/username/dev',\n    isSilent: true // false to show user confirmation prompts\n});\n\nremove.on('project-start', (path) =\u003e {\n    console.log('project started: ', path);\n});\n\nremove.on('file-deleted', (file) =\u003e {\n    console.log('file deleted: ', file);\n});\n\nremove.on('project-completed', (path) =\u003e {\n    console.log('project completed: ', path);\n});\n\nremove.on('end', () =\u003e {\n    console.log('end');\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanastro%2Fremove-git-ignored","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanastro%2Fremove-git-ignored","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanastro%2Fremove-git-ignored/lists"}