{"id":13447295,"url":"https://github.com/sindresorhus/gulp-size","last_synced_at":"2025-05-14T15:11:09.744Z","repository":{"id":12938509,"uuid":"15616373","full_name":"sindresorhus/gulp-size","owner":"sindresorhus","description":"Display the size of your project","archived":false,"fork":false,"pushed_at":"2025-01-24T06:31:41.000Z","size":114,"stargazers_count":229,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-03T07:28:26.906Z","etag":null,"topics":["gulp-plugin","gzip","javascript","nodejs","size"],"latest_commit_sha":null,"homepage":null,"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/sindresorhus.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":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","buy_me_a_coffee":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2014-01-03T18:26:38.000Z","updated_at":"2025-01-24T06:31:45.000Z","dependencies_parsed_at":"2025-02-08T22:01:32.874Z","dependency_job_id":"818b5b1c-2a37-4d8f-8115-9cc966a097a6","html_url":"https://github.com/sindresorhus/gulp-size","commit_stats":{"total_commits":68,"total_committers":10,"mean_commits":6.8,"dds":"0.13235294117647056","last_synced_commit":"6a605225fd4e512e371e2d6eaa6e4532f58b4567"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/gulp-size/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252926113,"owners_count":21826243,"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":["gulp-plugin","gzip","javascript","nodejs","size"],"created_at":"2024-07-31T05:01:13.179Z","updated_at":"2025-05-14T15:11:09.706Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://buymeacoffee.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["JavaScript","Plugins","插件"],"sub_categories":["Logging","日志"],"readme":"# gulp-size\n\n\u003e Display the size of your project\n\n\u003cimg src=\"screenshot.png\" width=\"341\"\u003e\n\nLogs out the total size of files in the stream and optionally the individual file-sizes.\n\n## Install\n\n```sh\nnpm install --save-dev gulp-size\n```\n\n## Usage\n\n```js\nimport gulp from 'gulp';\nimport size from 'gulp-size';\n\nexport default () =\u003e (\n\tgulp.src('fixture.js')\n\t\t.pipe(size())\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n## API\n\n### size(options?)\n\n#### options\n\nType: `object`\n\n##### title\n\nType: `string`\\\nDefault: `''`\n\nGive it a title so it's possible to distinguish the output of multiple instances logging at once.\n\n##### gzip\n\nType: `boolean`\\\nDefault: `false`\n\nDisplays the gzipped size.\n\n##### brotli\n\nType: `boolean`\\\nDefault: `false`\n\nDisplays the brotli compressed size.\n\n##### uncompressed\n\nType: `boolean`\\\nDefault: `false` if either of gzip or brotli is `true`, otherwise `true`\n\nDisplays the uncompressed size.\n\n##### pretty\n\nType: `boolean`\\\nDefault: `true`\n\nDisplays prettified size: `1337 B` → `1.34 kB`.\n\n##### showFiles\n\nType: `boolean`\\\nDefault: `false`\n\nDisplays the size of every file instead of just the total size.\n\n##### showTotal\n\nType: `boolean`\\\nDefault: `true`\n\nDisplays the total of all files.\n\n### size.size\n\nType: `number`\\\nExample: `12423000`\n\nThe total size of all files in bytes.\n\n### size.prettySize\n\nType: `string`\\\nExample: `14 kB`\n\nPrettified version of `.size`.\n\n#### Example\n\nYou could, for example, use this to report the total project size with [`gulp-notify`](https://github.com/mikaelbr/gulp-notify):\n\n```js\nimport gulp from 'gulp';\nimport size from 'gulp-size';\nimport notify from 'gulp-notify';\n\nexport default () =\u003e (\n\nexports.default = () =\u003e {\n\tconst sizeInstance = size();\n\n\treturn gulp.src('fixture.js')\n\t\t.pipe(sizeInstance)\n\t\t.pipe(gulp.dest('dist'))\n\t\t.pipe(notify({\n\t\t\tonLast: true,\n\t\t\tmessage: () =\u003e `Total size ${sizeInstance.prettySize}`\n\t\t}));\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fgulp-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fgulp-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fgulp-size/lists"}