{"id":24983645,"url":"https://github.com/posthtml/posthtml-stream","last_synced_at":"2025-03-29T10:12:37.699Z","repository":{"id":66088988,"uuid":"65540511","full_name":"posthtml/posthtml-stream","owner":"posthtml","description":"Stream Wrapper for PostHTML","archived":false,"fork":false,"pushed_at":"2016-10-04T15:10:42.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T21:06:07.876Z","etag":null,"topics":[],"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/posthtml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-08-12T09:17:52.000Z","updated_at":"2022-03-22T08:13:38.000Z","dependencies_parsed_at":"2023-02-20T20:45:15.053Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-stream","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"af8192d102f152c0603a4a046715255943640020"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245458719,"owners_count":20618697,"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":"2025-02-04T09:19:59.475Z","updated_at":"2025-03-29T10:12:37.669Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","readme":"[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Tests][build]][build-url]\n[![Coverage][cover]][cover-url]\n[![Standard Code Style][style]][style-url]\n[![Chat][chat]][chat-badge]\n\n# PostHTML Stream \u003cimg align=\"right\" width=\"200\" height=\"220\" title=\"PostHTML\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n\n## Install\n\n```bash\nnpm i -S posthtml-stream\n```\n## Usage\n\n### Options\n\n**`chunks`**: `[Regex]` Chunk Matcher (Passthrough)\n\n**`plugins`**: `[Array]` PostHTML Plugins\n\n**`options`**: `[Object]` PostHTML Options\n\n### Chunks\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003ctitle\u003ePostHTML Stream\u003c/title\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n\u003c!-- chunk --\u003e\n  \u003cheader\u003e\u003c/header\u003e\n  \u003c!-- chunk --\u003e\n  \u003cmain\u003e\u003c/main\u003e\n  \u003c!-- chunk --\u003e\n  \u003cfooter\u003e\u003c/footer\u003e\n\u003c!-- chunk --\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n```js\ncreateReadStream('index.html')\n  .pipe(split('\u003c!-- chunk --\u003e'))\n  .pipe(posthtml(/head/, plugins, options))\n  .pipe(createWriteStream('result.html'))\n```\n\n```txt\n                   --------------------\u003e /head/ ----------------------\u003e\nsrc ---\u003e split ---\u003e posthtml(/head/, plugins, options) -------------\u003e dest\n```\n\n## Maintainers\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n   \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg width=\"150 height=\"150\"\n      src=\"https://avatars.githubusercontent.com/u/5419992?v=3\u0026s=150\"\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"https://github.com/michael-ciniawsky\"\u003eMichael Ciniawsky\u003c/a\u003e\n    \u003c/td\u003e\n   \u003c/tr\u003e\n  \u003ctbody\u003e\n\u003c/table\u003e\n\n## Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [CONTRIBUTING](CONTRIBUTING.md).\n\n## LICENSE\n\n[MIT](LICENSE)\n\n[npm]: https://img.shields.io/npm/v/posthtml-stream.svg\n[npm-url]: https://npmjs.com/package/posthtml-stream\n\n[deps]: https://david-dm.org/posthtml/posthtml-stream.svg\n[deps-url]: https://david-dm.org/posthtml/posthtml-stream\n\n[build]: http://img.shields.io/travis/posthtml/posthtml-stream.svg\n[build-url]: https://travis-ci.org/posthtml/posthtml-stream\n\n[cover]: https://coveralls.io/repos/github/posthtml/posthtml-stream/badge.svg?branch=master\n[cover-url]: https://coveralls.io/github/posthtml/posthtml-stream?branch=master\n\n[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg\n[style-url]: http://standardjs.com/\n\n[chat]: https://badges.gitter.im/posthtml/posthtml.svg\n[chat-badge]: https://gitter.im/posthtml/posthtml?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-stream/lists"}