{"id":18400877,"url":"https://github.com/magicmark/tiny-treeshaker","last_synced_at":"2025-10-10T23:44:29.712Z","repository":{"id":69482436,"uuid":"378552338","full_name":"magicmark/tiny-treeshaker","owner":"magicmark","description":"🌳🥤 A tiny codemod for tree shaking (experimental) 🌳🥤","archived":false,"fork":false,"pushed_at":"2021-07-10T10:45:22.000Z","size":66,"stargazers_count":94,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T06:36:02.509Z","etag":null,"topics":["codemod","javascript","jscodeshift"],"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/magicmark.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}},"created_at":"2021-06-20T03:47:32.000Z","updated_at":"2024-01-04T16:58:46.000Z","dependencies_parsed_at":"2023-03-15T22:00:55.812Z","dependency_job_id":null,"html_url":"https://github.com/magicmark/tiny-treeshaker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/magicmark/tiny-treeshaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ftiny-treeshaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ftiny-treeshaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ftiny-treeshaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ftiny-treeshaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicmark","download_url":"https://codeload.github.com/magicmark/tiny-treeshaker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ftiny-treeshaker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005583,"owners_count":26083921,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["codemod","javascript","jscodeshift"],"created_at":"2024-11-06T02:37:10.207Z","updated_at":"2025-10-10T23:44:29.706Z","avatar_url":"https://github.com/magicmark.png","language":"JavaScript","readme":"# 🌳🥤 tiny-treeshaker\n\nA really ~bad~ tiny tree shaker (experimental)\n\n### Why?\n\nThis is a bare-bones tree shaking codemod that can be adapted for targeting specific use cases.\n\n(I made this cos i'm writing a seperate codemod for a migration I'm working on. The migration removes callsites to a bunch of random helper functions - which now eslint complains about, and I need to remove. Hence this tree shaking codemod.)\n\nExisting solutions are very fancy pants and try and target everything and require complex setups. I want to only target a known set\nof things to tree shake away. (allowlist vs denylist).\n\nThe goal of this is to be:\n- small as possible (while still being \"correct\". This won't shake away things you use, but may not shake away everything you don't use.)\n- simple to understand / extend / chop and change as needed\n\n### Usage\n\n- Clone this repo\n- [Install jscodeshift](https://github.com/facebook/jscodeshift)\n- Run with the CLI (e.g. `jscodeshift --transform /path/to/tiny-treeshaker/src/index.mjs ...`)\n\n### Work in progress\n\nThis doesn't shake _everything_ away just yet (sorry!), but gets most of the common cases (i.e. enough to be used when targeting a specific thing)\n\n### What you should probably use instead\n\n- https://github.com/coderaiser/putout\n- https://github.com/smeijer/unimported\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicmark%2Ftiny-treeshaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicmark%2Ftiny-treeshaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicmark%2Ftiny-treeshaker/lists"}