{"id":26685336,"url":"https://github.com/stackhtml/documentify","last_synced_at":"2025-04-12T15:45:41.353Z","repository":{"id":57214334,"uuid":"98208195","full_name":"stackhtml/documentify","owner":"stackhtml","description":"Modular HTML bundler","archived":false,"fork":false,"pushed_at":"2020-04-25T17:09:07.000Z","size":39,"stargazers_count":47,"open_issues_count":4,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T10:15:15.742Z","etag":null,"topics":["compile","html","modular","stream"],"latest_commit_sha":null,"homepage":"","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/stackhtml.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":"2017-07-24T15:52:27.000Z","updated_at":"2020-10-28T07:31:36.000Z","dependencies_parsed_at":"2022-08-29T01:50:50.141Z","dependency_job_id":null,"html_url":"https://github.com/stackhtml/documentify","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fdocumentify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fdocumentify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fdocumentify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fdocumentify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackhtml","download_url":"https://codeload.github.com/stackhtml/documentify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248591089,"owners_count":21129953,"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":["compile","html","modular","stream"],"created_at":"2025-03-26T10:15:16.895Z","updated_at":"2025-04-12T15:45:41.332Z","avatar_url":"https://github.com/stackhtml.png","language":"JavaScript","funding_links":["https://opencollective.com/choo"],"categories":[],"sub_categories":[],"readme":"# documentify [![stability][0]][1]\n[![npm version][2]][3] [![build status][4]][5]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nModular HTML bundler.\n\n## Usage\n```txt\n  $ documentify [entry-file] [options]\n\n  Options:\n\n    -h, --help        print usage\n    -v, --version     print version\n\n  Examples:\n\n    Start bundling HTML\n    $ documentify .\n\n    Bundle HTML from a stream\n    $ cat index.html | documentify\n\n  Running into trouble? Feel free to file an issue:\n  https://github.com/stackhtml/documentify/issues/new\n\n  Do you enjoy using this software? Become a backer:\n  https://opencollective.com/choo\n```\n\n## Configuring transforms\n### Command Line\n```sh\n$ documentify ./index.html -t my-transform -t another-transform\n```\n\n### package.json\n```json\n{\n  \"name\": \"my-app\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"documentify\": {\n    \"transform\": [\n      \"my-transform\",\n      \"another-transform\"\n    ]\n  }\n}\n```\n\n## Writing transforms\nA transform is a regular function that returns a `through` stream. The\n`through` stream can modify the HTML stream, which in turn passes data to the\nnext stream. Together the streams form a pipeline.\n\n```js\nvar through = require('through2')\n\nmodule.exports = transform\n\nfunction transform (opts) {\n  return through()\n}\n```\n\n## API\n### `document = documentify(entry, [html], [opts])`\nCreate a new documentify instance. If `entry` is a `.html` file, it'll be\nused as the source. If `entry` is falsy and `html` is a string or readable\nstream, that will be used as the input instead. Otherwise if `entry` is falsy\nand `html` is omitted, an empty HTML file with just a body and head will be\nused as the source.\n\n### `document.transform(fn, [opts])`\nPass a transform to the document instance\n\n### `readableStream = document.bundle()`\nCreate a new readable stream, and start flowing the html through the\ntransforms.\n\n## See Also\n- [substack/hyperstream](https://github.com/substack/hyperstream)\n- [choojs/bankai](https://github.com/choojs/bankai)\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/documentify.svg?style=flat-square\n[3]: https://npmjs.org/package/documentify\n[4]: https://img.shields.io/travis/stackhtml/documentify/master.svg?style=flat-square\n[5]: https://travis-ci.org/stackhtml/documentify\n[6]: https://img.shields.io/codecov/c/github/stackhtml/documentify/master.svg?style=flat-square\n[7]: https://codecov.io/github/stackhtml/documentify\n[8]: http://img.shields.io/npm/dm/documentify.svg?style=flat-square\n[9]: https://npmjs.org/package/documentify\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhtml%2Fdocumentify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackhtml%2Fdocumentify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhtml%2Fdocumentify/lists"}