{"id":16818557,"url":"https://github.com/rubiin/npmprune","last_synced_at":"2025-10-09T00:36:44.732Z","repository":{"id":246256864,"uuid":"736857474","full_name":"rubiin/npmprune","owner":"rubiin","description":"Prune unnecessary files from node_modules ","archived":false,"fork":false,"pushed_at":"2024-06-26T18:12:05.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T23:49:57.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/rubiin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["rubiin"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/XbgWxt567"]}},"created_at":"2023-12-29T04:45:49.000Z","updated_at":"2024-06-26T18:12:08.000Z","dependencies_parsed_at":"2024-06-26T22:52:48.056Z","dependency_job_id":null,"html_url":"https://github.com/rubiin/npmprune","commit_stats":null,"previous_names":["rubiin/npmprune"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubiin%2Fnpmprune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubiin%2Fnpmprune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubiin%2Fnpmprune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubiin%2Fnpmprune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubiin","download_url":"https://codeload.github.com/rubiin/npmprune/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244045492,"owners_count":20388949,"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-10-13T10:50:29.027Z","updated_at":"2025-10-09T00:36:39.711Z","avatar_url":"https://github.com/rubiin.png","language":"PowerShell","funding_links":["https://github.com/sponsors/rubiin","https://www.buymeacoffee.com/XbgWxt567"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.imgur.com/kyxhcwg.png\" width=\"128\" height=\"128\"\u003e\u003c/p\u003e\n\n# NPMprune\n\nFork of `npmprune.sh` with support for windows and added extras\n\n`npmprune.sh` is an lightweight script designed to clean up your `node_modules` directory by removing unnecessary files like Markdown, doc and config files.\n\nIt helps in reducing the overall size of `node_modules`, optimizing storage space, and speeding up deployments, especially in containerized environments.\n\nBy detecting `NODE_ENV`, it can perform a more aggressive cleanup, tailored for production builds such as in Docker containers.\n\n1. [Install](#install)\n2. [Usage (Unix/Linux)](#usage-linux)\n3. [Usage (Windows)](#usage-windows)\n4. [Integration](#integration)\n   - [In deployment scripts](#in-deployment-scripts)\n   - [In a Dockerfile](#in-a-dockerfile)\n5. [Compatibility](#compatibility)\n\n## Install\n\n```sh\nwget -O /usr/local/bin/npmprune https://raw.githubusercontent.com/rubiin/npmprune/master/npmprune.sh\n```\n\n## Usage (Unix/Linux)\n\n1. Ensure you have execution permissions: `chmod +x npmprune.sh`\n2. Run the script in your project directory: `./npmprune.sh`\n\n## Usage (Windows)\n\n1. Open PowerShell.\n2. Navigate to your project directory.\n3. Run the script: `.\\npmprunewin.ps1`\n\nThe PowerShell version, `npmprunewin.ps1`, performs similar functions as the shell script but is tailored for Windows environments. It leverages PowerShell commands to efficiently clean the `node_modules` directory, taking into consideration the Windows filesystem and permissions.\n\n### Production mode\n\nIf the `NODE_ENV` environment variable is set to `production`, NPMprune performs a more extensive cleanup by also removing type definitions.\n\n## Integration\n\n### In deployment scripts\n\n```sh\nwget -qO- https://raw.githubusercontent.com/rubiin/npmprune/master/npmprune.sh | sh\n```\n\n### In a Dockerfile\n\n```dockerfile\nRUN wget -qO- https://raw.githubusercontent.com/rubiin/npmprune/master/npmprune.sh | sh\n```\n\n# Compatibility\n\nNPMprune is compatible with Windows, Linux and macOS environments, even with the most basic Alpine Linux setup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubiin%2Fnpmprune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubiin%2Fnpmprune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubiin%2Fnpmprune/lists"}