{"id":16226289,"url":"https://github.com/antony/hapi-svelte-views","last_synced_at":"2025-03-19T13:30:33.571Z","repository":{"id":42825059,"uuid":"266815338","full_name":"antony/hapi-svelte-views","owner":"antony","description":"Svelte view plugin for HapiJS, which supports SSR and CSR","archived":false,"fork":false,"pushed_at":"2023-03-04T20:18:39.000Z","size":483,"stargazers_count":9,"open_issues_count":10,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T18:47:24.034Z","etag":null,"topics":["csr","hapi","hapijs","ssr","static","static-site","static-site-generator","svelte","svelte3","sveltejs","views","vision"],"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/antony.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-25T15:31:41.000Z","updated_at":"2023-08-06T06:29:43.000Z","dependencies_parsed_at":"2024-10-27T20:34:31.408Z","dependency_job_id":"83f8f89a-c517-473d-9c47-d12a8690ff54","html_url":"https://github.com/antony/hapi-svelte-views","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fhapi-svelte-views","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fhapi-svelte-views/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fhapi-svelte-views/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fhapi-svelte-views/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antony","download_url":"https://codeload.github.com/antony/hapi-svelte-views/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989576,"owners_count":20379648,"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":["csr","hapi","hapijs","ssr","static","static-site","static-site-generator","svelte","svelte3","sveltejs","views","vision"],"created_at":"2024-10-10T12:48:39.668Z","updated_at":"2025-03-19T13:30:33.190Z","avatar_url":"https://github.com/antony.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Hapi Svelte Views\n\nStatus: Working, but experimental\n\n![publish](https://github.com/antony/hapi-svelte-views/workflows/publish/badge.svg)\n[![NPM version](https://img.shields.io/npm/v/hapi-svelte-views.svg)](https://www.npmjs.com/package/hapi-svelte-views)\n\n### Installation and Usage\n\n```bash\nnpm install --save-dev hapi-svelte-views svelte @hapi/vision\n```\n\n```js\n  // server.js\n  const Vision = require('@hapi/vision')\n  const Svelte = require('hapi-svelte-views')\n\n  // ... your server set-up here ...\n\n  // Register Vision and Svelte plugins\n  await server.register(Vision);\n  await server.register(Svelte);\n\n  // Configure Vision / Svelte plugins\n  server.views({\n    engines: {\n      svelte: Svelte\n    },\n    relativeTo: __dirname,\n    path: 'views' // Put your .svelte components into 'views'\n  })\n\n  // Some Route\n  server.route({\n    method: 'GET',\n    path: '/',\n    handler: (request, h) =\u003e {\n      // Render Home view and pass it some props\n      const props = { name: 'World' }\n      const layout = 'BasicLayout'\n      return h.view('Home', { layout, props })\n    }\n  })\n```\n\n```js\n  // views/Home.svelte\n  \u003ch1\u003eHello {name}!\u003c/h1\u003e\n```\n\n```js\n  // views/BasicLayout.svelte\n  \u003cnav\u003e\n    \u003cul\u003e\n      \u003cli\u003eBrand\u003cli\u003e\n    \u003c/ul\u003e\n  \u003c/nav\u003e\n  \u003cslot\u003e\u003c/slot\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony%2Fhapi-svelte-views","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantony%2Fhapi-svelte-views","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony%2Fhapi-svelte-views/lists"}