{"id":15699150,"url":"https://github.com/stevenvachon/grunt-cleanempty","last_synced_at":"2025-05-08T22:31:33.710Z","repository":{"id":12486756,"uuid":"15156126","full_name":"stevenvachon/grunt-cleanempty","owner":"stevenvachon","description":"Clean empty files and folders.","archived":false,"fork":false,"pushed_at":"2016-02-21T00:43:39.000Z","size":20,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-01T03:41:32.336Z","etag":null,"topics":["clean","filesystem","grunt-plugins","nodejs","task"],"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/stevenvachon.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":"2013-12-13T06:05:53.000Z","updated_at":"2019-10-22T20:46:13.000Z","dependencies_parsed_at":"2022-09-13T20:20:15.928Z","dependency_job_id":null,"html_url":"https://github.com/stevenvachon/grunt-cleanempty","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fgrunt-cleanempty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fgrunt-cleanempty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fgrunt-cleanempty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fgrunt-cleanempty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevenvachon","download_url":"https://codeload.github.com/stevenvachon/grunt-cleanempty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253157821,"owners_count":21863176,"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":["clean","filesystem","grunt-plugins","nodejs","task"],"created_at":"2024-10-03T19:38:40.299Z","updated_at":"2025-05-08T22:31:33.684Z","avatar_url":"https://github.com/stevenvachon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-cleanempty [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][david-image]][david-url]\n\n\u003e Clean empty files and folders.\n\n\n## Getting Started\nThis plugin requires Grunt `\u003e=0.4`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-cleanempty --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-cleanempty');\n```\n\n\n## The \"cleanempty\" task\n\n\n### Overview\nIn your project's Gruntfile, add a section named `cleanempty` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  cleanempty: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    },\n  },\n});\n```\n\n\n### Options\n\n#### options.files\nType: `Boolean`  \nDefault value: `true`  \n\nRemove empty files or not.\n\n#### options.folders\nType: `Boolean`  \nDefault value: `true`  \n\nRemove empty folders or not.\n\n#### options.force\nType: `Boolean`  \nDefault value: `false`  \n\nOverride the task from blocking deletion of folders outside current working dir (CWD). Use with caution.\n\n#### options.noJunk\nType: `Boolean`  \nDefault value: `false`  \n\nConsider folders that only have [junk](https://github.com/sindresorhus/junk) files in them to be empty. Use in conjunction with `options.folders` set to `true`.\n\n\n### Usage Examples\n\n#### Default Options\n```js\ngrunt.initConfig({\n  cleanempty: {\n    options: {},\n    src: ['src/testing/**/*', 'src/123/*'],\n  },\n});\n```\n\n#### Custom Options\n```js\ngrunt.initConfig({\n  cleanempty: {\n    options: {\n      force: true,\n    },\n    testing: {\n      options: {\n        files: false,\n      },\n      src: ['src/testing/**/*']\n    }\n    123: {\n      src: ['src/123/*'],\n    },\n  },\n});\n```\n\n\n## Roadmap Features\n* switch to asynchronous file system functions to better support [grunt-concurrent](https://github.com/sindresorhus/grunt-concurrent)\n\n\n## Release History\n* 1.0.4 supports grunt `1.x` and npm `3.x`\n* 1.0.3 added `options.noJunk`\n* 1.0.2 performance enhancement\n* 1.0.1 tweaked log verbosity\n* 1.0.0 release\n* 0.2.1 added tests\n* 0.2.0 added `options.folders`\n* 0.1.0 initial release\n\n\n[npm-image]: https://img.shields.io/npm/v/grunt-cleanempty.svg\n[npm-url]: https://npmjs.org/package/grunt-cleanempty\n[travis-image]: https://img.shields.io/travis/stevenvachon/grunt-cleanempty.svg\n[travis-url]: https://travis-ci.org/stevenvachon/grunt-cleanempty\n[david-image]: https://img.shields.io/david/stevenvachon/grunt-cleanempty.svg\n[david-url]: https://david-dm.org/stevenvachon/grunt-cleanempty\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fgrunt-cleanempty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenvachon%2Fgrunt-cleanempty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fgrunt-cleanempty/lists"}