{"id":15314376,"url":"https://github.com/barelyhuman/sizesnap","last_synced_at":"2025-04-15T02:13:29.932Z","repository":{"id":44071666,"uuid":"444250100","full_name":"barelyhuman/sizesnap","owner":"barelyhuman","description":"Simple file size snapshot generator","archived":false,"fork":false,"pushed_at":"2023-07-01T18:49:54.000Z","size":204,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-04-15T02:13:13.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://sizesnap.barelyhuman.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barelyhuman.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-04T01:34:48.000Z","updated_at":"2025-03-09T20:35:16.000Z","dependencies_parsed_at":"2023-01-20T08:17:48.271Z","dependency_job_id":null,"html_url":"https://github.com/barelyhuman/sizesnap","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fsizesnap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fsizesnap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fsizesnap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fsizesnap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barelyhuman","download_url":"https://codeload.github.com/barelyhuman/sizesnap/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991558,"owners_count":21194894,"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-01T08:45:16.345Z","updated_at":"2025-04-15T02:13:29.899Z","avatar_url":"https://github.com/barelyhuman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sizesnap\n\n\u003e Simple file size snapshot generator\n\n- Tiny (15.3kB, 5.45kB gzip, 4.94kB brotli) , alternatives go up to 1MB\n- Single File (thanks to [@vercel/ncc](https://github.com/@vercel/ncc))\n- I don't have more points...\n- Pretty Printer (+ CLI Table, Markdown Table)\n\n## Web version\n\nThere's also a webversion, which serves the purpose of quickly checking a package's contents and their sizes. You can view it on [sizesnap.barelyhuman.dev](http://sizesnap.barelyhuman.dev)\n\n## Lighter CLI\n\nThere's also a subpackage which is about **400B** if you'd like to use that for a CLI or writing your own programmatic API\nYou can read about it on it's own readme [packages/sizesnap-lite](packages/sizesnap-lite)\n\n## Install\n\n```sh\nnpm i -D sizesnap\n#\nyarn add -D sizesnap\n```\n\n## Usage\n\nAdd the following in your `package.json`, `files` is an `[]` of file glob paths\n\n```json\n{\n  \"scripts\": {\n    \"size\": \"sizesnap\"\n  },\n  \"sizesnap\": {\n    \"files\": [\"./*.js\", \"./lib/*.js\"]\n  }\n}\n```\n\n```sh\n\u003e yarn size\n# output\n\u003e\u003e Reading Config\n\u003e\u003e Sizing dist/index.js - 14.72KB\n\u003e\u003e Sizing src/api.js - 4.71KB\n\u003e\u003e Sizing src/constants.js - 80B\n\u003e\u003e Sizing src/index.js - 762B\n\u003e\u003e Sizing src/lib/bytes.js - 72B\n\u003e\u003e Sizing src/lib/files.js - 372B\n\u003e\u003e Sizing src/lib/loggers.js - 357B\n\u003e\u003e Sizing src/lib/zipped.js - 444B\n-x- Generated .sizesnap.json\n\n# or\n\n# `table` is deprecated , use `--table` instead\n\u003e yarn size table\n\u003e yarn size --table\n\n# output\nFILEPATH                SIZE    GZIP    BROTLI\ndist/index.js           14.74KB 5.6KB   5.08KB\nsrc/api.js              4.71KB  1.46KB  1.32KB\nsrc/constants.js        80B     75B     73B\nsrc/index.js            801B    402B    340B\nsrc/lib/bytes.js        72B     79B     76B\nsrc/lib/files.js        372B    223B    186B\nsrc/lib/loggers.js      357B    216B    186B\nsrc/lib/zipped.js       444B    207B    186B\n\n\u003e yarn size --table --markdown\n\n# output\n|FILEPATH     |SIZE   |GZIP  |BROTLI|\n|-------------|-------|------|------|\n|dist/index.js|15.76KB|5.78KB|5.26KB|\n\n```\n\n## API\n\nThe package features a builder style API, you can get a fair understanding of using it from [src/index.js](packages/sizesnap/src/index.js) file\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fsizesnap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarelyhuman%2Fsizesnap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fsizesnap/lists"}