{"id":40212770,"url":"https://github.com/socketstream/ss-ractive","last_synced_at":"2026-01-19T21:34:27.441Z","repository":{"id":23371590,"uuid":"26732920","full_name":"socketstream/ss-ractive","owner":"socketstream","description":"Ractive.js template engine wrapper providing server-side compiled templates for SocketStream apps","archived":false,"fork":false,"pushed_at":"2015-09-13T03:26:47.000Z","size":184,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-27T10:45:52.650Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/socketstream.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-17T00:10:10.000Z","updated_at":"2019-06-14T06:35:44.000Z","dependencies_parsed_at":"2022-09-05T20:41:14.567Z","dependency_job_id":null,"html_url":"https://github.com/socketstream/ss-ractive","commit_stats":null,"previous_names":["arxpoetica/ss-ractive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/socketstream/ss-ractive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketstream%2Fss-ractive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketstream%2Fss-ractive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketstream%2Fss-ractive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketstream%2Fss-ractive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socketstream","download_url":"https://codeload.github.com/socketstream/ss-ractive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketstream%2Fss-ractive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28585530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-19T21:34:27.335Z","updated_at":"2026-01-19T21:34:27.428Z","avatar_url":"https://github.com/socketstream.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ractive Template Engine wrapper for SocketStream\n\nhttp://www.ractivejs.org/\n\nRactive client-side templates in your app.\n\n### Setup\n\nAdd `ss-ractive` to your application's `package.json` file:\n\n```\nnpm install ss-ractive@latest --save\n```\n\nThen add this line to app.js:\n\n```javascript\nss.client.templateEngine.use(require('ss-ractive'));\n```\n\n### Usage\n\nss-ractive wraps Ractive script tags (`\u003cscript type=\"text/ractive\"\u003e...\u003c/script\u003e`) around SocketStream templates. For example, a jade template file (compiled with `ss-jade`) located at `/client/templates/test/component.jade` with the following content:\n\n```jade\nh1 {{title}}\n| {{{content}}}\n```\n\nWill compile to HTML script tags:\n\n```html\n\u003cscript id=\"test-component\" type=\"text/ractive\"\u003e\u003ch1\u003e{{title}}\u003c/h1\u003e{{{content}}}\u003c/script\u003e\n```\n\nAnd can be registered on the client as a component with Ractive.js as follows:\n\n```javascript\nRactive.components.TestComponent = Ractive.extend({\n\ttemplate: '#test-component',\n\tdata: {\n\t\ttitle: 'This Is The Title',\n\t\tcontent: '\u003cp\u003eSample content \u003cem\u003ehere\u003c/em\u003e.\u003c/p\u003e'\n\t},\n\t// etc.\n});\n```\n\nNotice the prefix `ractive-` to avoid namespace collision. Note also the preservation of handlebars syntax in the compiled templates, since Ractive.js relies heavily on Handlebars-like syntax [see the Ractive.js documentation](http://docs.ractivejs.org/latest/get-started).\n\nThe above example shows templates first compiled with Jade ([ss-jade](https://github.com/socketstream/ss-jade)), but in theory, any compiled templates will work with ss-ractive, as long as the definition (`ss.client.templateEngine.use(require('ss-ractive'));`) comes after other template engine definitions.\n\nThis wrapper also allows for pretty output for development, as well as loading a legacy ractive file:\n\n```javascript\nss.client.templateEngine.use(require('ss-ractive'), '/', {\n\t// pretty html\n\tpretty: true,\n\t// load a different ractive filename from the npm repo\n\t// (the path is resolved via require.resolve('ractive'))\n\tractiveFilename: 'ractive-legacy.runtime.min.js'\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketstream%2Fss-ractive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketstream%2Fss-ractive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketstream%2Fss-ractive/lists"}