{"id":13409092,"url":"https://github.com/enygma/composerclean","last_synced_at":"2025-04-13T04:31:44.871Z","repository":{"id":32554371,"uuid":"36136756","full_name":"enygma/composerclean","owner":"enygma","description":"An additional command for Composer that removes configured files/directory","archived":false,"fork":false,"pushed_at":"2018-01-25T14:42:32.000Z","size":3,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T21:22:40.060Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/enygma.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":"2015-05-23T18:29:56.000Z","updated_at":"2023-02-11T20:21:15.000Z","dependencies_parsed_at":"2022-08-21T11:50:36.896Z","dependency_job_id":null,"html_url":"https://github.com/enygma/composerclean","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enygma%2Fcomposerclean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enygma%2Fcomposerclean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enygma%2Fcomposerclean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enygma%2Fcomposerclean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enygma","download_url":"https://codeload.github.com/enygma/composerclean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381796,"owners_count":21094528,"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":"2024-07-30T20:00:57.952Z","updated_at":"2025-04-13T04:31:44.851Z","avatar_url":"https://github.com/enygma.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"\"Clean\" command for Composer\n==================\n\nWith Composer being used often to build a package to deploy, it makes sense that there should be functionality to strip out certain things (like README or a `tests/` directory) that don't need to be deployed. With this addition you'll be given a command to \"clean\" the packages in your repositories and make it ready for deploy.\n\n## Usage\n\nTo use the package, you'll need two things. First, on your application you need to make the \"clean\" command available. First, install the latest version of the `ComposerClean` package:\n\n```\ncomposer require enygma/composerclean\n```\n\nThen you update your `composer.json` file to make it a command:\n\n```\n{\n\t\"scripts\": {\n\t\t\"clean\": \"ComposerClean\\\\Clean::exec\"\n\t}\n}\n```\n\nThen you can fire off the cleaning process with a call to:\n\n```\ncomposer.phar clean\n```\n\nThis will go through your installed repositories and remove the items marked in the project's \"clean\" list. To define this list in your own project, you put the list of directories or files in the `composer.json` configuration in the `extras` section:\n\n```\n{\n\t\"extras\": {\n\t\t\"clean\": [\n\t\t\t\"tests/\",\n\t\t\t\"README.md\",\n\t\t\t\"LICENSE\"\n\t\t]\n\t}\n}\n```\n\nThe command will do its best to remove the files and directories (recursing down) you've specified. The paths start from the root of the project so `tests/` would relate to something like `vendor/enygma/composerclean/tests` and everything under it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenygma%2Fcomposerclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenygma%2Fcomposerclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenygma%2Fcomposerclean/lists"}