{"id":13727343,"url":"https://github.com/ampproject/filesize","last_synced_at":"2025-04-04T16:09:43.204Z","repository":{"id":38891757,"uuid":"236095797","full_name":"ampproject/filesize","owner":"ampproject","description":"Monitor the size of files in your project specified within package.json.","archived":false,"fork":false,"pushed_at":"2025-01-07T03:46:15.000Z","size":852,"stargazers_count":75,"open_issues_count":24,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T15:08:11.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ampproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2020-01-24T22:41:46.000Z","updated_at":"2024-06-21T19:58:05.000Z","dependencies_parsed_at":"2024-11-11T14:28:21.628Z","dependency_job_id":"2ea64a09-9e47-49f2-9f01-061388f38c0b","html_url":"https://github.com/ampproject/filesize","commit_stats":{"total_commits":129,"total_committers":8,"mean_commits":16.125,"dds":0.5193798449612403,"last_synced_commit":"868a74e43ce058caac0a08595664d4db99e14c48"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Ffilesize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Ffilesize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Ffilesize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Ffilesize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ampproject","download_url":"https://codeload.github.com/ampproject/filesize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208143,"owners_count":20901570,"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-08-03T01:03:50.966Z","updated_at":"2025-04-04T16:09:43.182Z","avatar_url":"https://github.com/ampproject.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Filesize\n\n**Purpose**: Monitor the size of files in your project specified within `package.json`.\n\nUses native compression from Node Core, attempts to parallelize compression work across available CPUs, and requires Node \u003e= `12`.\n\n![Interactive UI Processing Large Files](https://raw.githubusercontent.com/ampproject/filesize/main/.github/preview.gif)\n\n## Installation\n\n```bash\nyarn add @ampproject/filesize --dev\n```\n\n## Usage\n\nSpecify an object of files you'd like to check the size for inside the `filesize` key of `package.json`.\n\n```json\n{\n  \"filesize\": {\n    \"./dist/index.js\": {\n      \"brotli\": \"11.4 kB\"\n    }\n  }\n}\n```\n\nEach file (key in the filesize object) must include an object with key/value pairs:\n1. The key is the `compression` type you would like to use on the file.\n2. The value is the string representation of the files maximum allowed size.\n\n**After completing configuration**, invoke `filesize` via: `yarn filesize`. \n\nOptionally one can target a different project directory via the `p` parameter `yarn filesize -p={PATH}`, or a different configuration file via the `c` parameter `yarn filesize -c=${PATH/filesize.json}`.\n\n### Track Resource Size\n\nThis utility now also supports tracking filesizes without enforcing a max limit. To use this feature add a `track` key to the `filesize` entry.\n\n```json\n{\n  \"filesize\": {\n    \"track\": [\"./dist/**/*.mjs\"],\n  }\n}\n```\n\nThese values will be added to the output report for all comression types.\n\n## Security disclosures\n\nThe AMP Project accepts responsible security disclosures through the [Google Application Security program](https://www.google.com/about/appsecurity/).\n\n## Code of conduct\n\nThe AMP Project strives for a positive and growing project community that provides a safe environment for everyone.  All members, committers and volunteers in the community are required to act according to the [code of conduct](.github/CODE_OF_CONDUCT.md).\n\n## License\n\nfilesize is licensed under the [Apache License, Version 2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fampproject%2Ffilesize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fampproject%2Ffilesize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fampproject%2Ffilesize/lists"}