{"id":18096291,"url":"https://github.com/bredele/steroid","last_synced_at":"2025-04-13T10:05:16.636Z","repository":{"id":57267625,"uuid":"61949484","full_name":"bredele/steroid","owner":"bredele","description":":pill: A template engine on steroid","archived":false,"fork":false,"pushed_at":"2017-07-06T21:47:51.000Z","size":36,"stargazers_count":21,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T01:23:55.860Z","etag":null,"topics":["html","isomorphic","stream","template","template-engine"],"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/bredele.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-25T15:32:14.000Z","updated_at":"2023-05-08T15:43:20.000Z","dependencies_parsed_at":"2022-09-02T05:40:57.047Z","dependency_job_id":null,"html_url":"https://github.com/bredele/steroid","commit_stats":null,"previous_names":["bredele/html-stream"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsteroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsteroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsteroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsteroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bredele","download_url":"https://codeload.github.com/bredele/steroid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695438,"owners_count":21146954,"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":["html","isomorphic","stream","template","template-engine"],"created_at":"2024-10-31T19:13:21.181Z","updated_at":"2025-04-13T10:05:16.603Z","avatar_url":"https://github.com/bredele.png","language":"JavaScript","readme":"# Steroid\n\n  \u003e [Vomit](http://github.com/bredele/vomit) server side engine\n\nSteroid is a powerful HTML-based templating engine that runs on Node.js and in the browser. It does all the heavy lifting for you and supports streaming, partials, asynchronous rendering (with promises and streams) and more.\n\n[Learn more](https://github.com/bredele/steroid/tree/master/docs) about Steroid and even [Try it Online](http://requirebin.com/?gist=bredele/cf00e520874e30a7b628787ebdad290f)!\n\n[![Build Status](https://travis-ci.org/bredele/steroid.svg?branch=master)](https://travis-ci.org/bredele/steroid)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg?style=flat-square)](https://gitter.im/vomitjs/Lobby)\n[![NPM](https://img.shields.io/npm/v/steroid.svg?style=flat-square)](https://www.npmjs.com/package/steroid)\n[![Downloads](https://img.shields.io/npm/dm/steroid.svg?style=flat-square)](http://npm-stat.com/charts.html?package=steroid)\n[![pledge](https://bredele.github.io/contributing-guide/community-pledge.svg)](https://github.com/bredele/contributing-guide/blob/master/community.md)\n\n\n\n## Usage\n\nNo weird syntax or compilation. Steroid is pure HTML and JavaScript and a minute is enough to get your hands on it.\n\n```javascript\nconst html = require('steroid')\nconst http = require('http')\n\nhttp.createServer((req, res) =\u003e {\n  const country = 'France'\n  \n  // steroid returns a stream\n  html`\n    \u003carticle\u003e\n      \u003ch2\u003eHello ${country}\u003c/h2\u003e\n      ${fetch('/api/weather?' + country).then(weather)}\n    \u003c/article\u003e\n  `.pipe(res)\n}).listen(3000)\n\n\nfunction weather(forecast) {\n  return html`\n  \u003cdiv class=\"weather\"\u003e\n    Weather is ${forecast.result}\n    \u003cul\u003e${forecast.cities.map(city)}\u003c/ul\u003e\n  \u003c/div\u003e\n  `\n}\n\nfunction city(name) {\n  return html`\u003cli\u003e${name}\u003c/li\u003e`\n}\n```\n\nEven if Steroid works in your browser, we recommend you to use [vomit](http://github.com/bredele/vomit) to build rich applications in the front end. Vomit uses the same syntax than Steroid but leverage DOM instead of Streams.\n\nCheck out [examples](https://github.com/bredele/steroid/tree/master/examples) and [docs](https://github.com/bredele/steroid/tree/master/docs) for more information.\n\n## Installation\n\n```shell\nnpm install steroid --save\n```\n\n[![NPM](https://nodei.co/npm/steroid.png)](https://nodei.co/npm/steroid/)\n\n## Question\n\nFor questions and feedback please use our [twitter account](https://twitter.com/bredeleca). For support, bug reports and or feature requests please make sure to read our\n\u003ca href=\"https://github.com/bredele/contributing-guide/blob/master/community.md\" target=\"_blank\"\u003ecommunity guideline\u003c/a\u003e and use the issue list of this repo and make sure it's not present yet in our reporting checklist.\n\n## Contribution\n\nSteroid is an open source project and would not exist without its community. If you want to participate please make sure to read our \u003ca href=\"https://github.com/bredele/contributing-guide/blob/master/community.md\" target=\"_blank\"\u003eguideline\u003c/a\u003e before making a pull request. If you have any steroid-related project, component or other let everyone know in our wiki.\n\n\n## Licence\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Olivier Wietrich\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fsteroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbredele%2Fsteroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fsteroid/lists"}