{"id":15994380,"url":"https://github.com/oskarrough/r4-sapper","last_synced_at":"2026-02-09T00:35:15.113Z","repository":{"id":151237963,"uuid":"164101106","full_name":"oskarrough/r4-sapper","owner":"oskarrough","description":"Trying out svelte/sapper","archived":false,"fork":false,"pushed_at":"2019-06-23T12:00:08.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-11T03:10:36.442Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://radio4000-sapper-trpufizzco.now.sh","language":"HTML","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/oskarrough.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":"2019-01-04T11:49:22.000Z","updated_at":"2019-02-03T15:58:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef72e5ab-0a91-431f-adbd-9122b8d30447","html_url":"https://github.com/oskarrough/r4-sapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oskarrough/r4-sapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fr4-sapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fr4-sapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fr4-sapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fr4-sapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oskarrough","download_url":"https://codeload.github.com/oskarrough/r4-sapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fr4-sapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29251546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T22:49:53.206Z","status":"ssl_error","status_checked_at":"2026-02-08T22:49:51.384Z","response_time":57,"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":"2024-10-08T07:08:43.758Z","updated_at":"2026-02-09T00:35:15.070Z","avatar_url":"https://github.com/oskarrough.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sapper-template\n\nThe default [Sapper](https://github.com/sveltejs/sapper) template. To clone it and get started:\n\n```bash\nnpx degit sveltejs/sapper-template my-app\ncd my-app\nnpm install # or yarn!\nnpm run dev\n```\n\nOpen up [localhost:3000](http://localhost:3000) and start clicking around.\n\nConsult [sapper.svelte.technology](https://sapper.svelte.technology) for help getting started.\n\n*[Click here for the Rollup version of this template](https://github.com/sveltejs/sapper-template/tree/rollup)*\n\n## Structure\n\nSapper expects to find three directories in the root of your project —  `app`, `assets` and `routes`.\n\n\n### app\n\nThe [app](app) directory contains the entry points for your app — `client.js`, `server.js` and (optionally) a `service-worker.js` — along with a `template.html` file.\n\n\n### assets\n\nThe [assets](assets) directory contains any static assets that should be available. These are served using [sirv](https://github.com/lukeed/sirv).\n\nIn your [service-worker.js](app/service-worker.js) file, you can import these as `assets` from the generated manifest...\n\n```js\nimport { assets } from './manifest/service-worker.js';\n```\n\n...so that you can cache them (though you can choose not to, for example if you don't want to cache very large files).\n\n\n### routes\n\nThis is the heart of your Sapper app. There are two kinds of routes — *pages*, and *server routes*.\n\n**Pages** are Svelte components written in `.html` files. When a user first visits the application, they will be served a server-rendered version of the route in question, plus some JavaScript that 'hydrates' the page and initialises a client-side router. From that point forward, navigating to other pages is handled entirely on the client for a fast, app-like feel. (Sapper will preload and cache the code for these subsequent pages, so that navigation is instantaneous.)\n\n**Server routes** are modules written in `.js` files, that export functions corresponding to HTTP methods. Each function receives Express `request` and `response` objects as arguments, plus a `next` function. This is useful for creating a JSON API, for example.\n\nThere are three simple rules for naming the files that define your routes:\n\n* A file called `routes/about.html` corresponds to the `/about` route. A file called `routes/blog/[slug].html` corresponds to the `/blog/:slug` route, in which case `params.slug` is available to the route\n* The file `routes/index.html` (or `routes/index.js`) corresponds to the root of your app. `routes/about/index.html` is treated the same as `routes/about.html`.\n* Files and directories with a leading underscore do *not* create routes. This allows you to colocate helper modules and components with the routes that depend on them — for example you could have a file called `routes/_helpers/datetime.js` and it would *not* create a `/_helpers/datetime` route\n\n\n## Webpack config\n\nSapper uses webpack to provide code-splitting, dynamic imports and hot module reloading, as well as compiling your Svelte components. As long as you don't do anything daft, you can edit the configuration files to add whatever loaders and plugins you'd like.\n\n\n## Production mode and deployment\n\nTo start a production version of your app, run `npm run build \u0026\u0026 npm start`. This will disable hot module replacement, and activate the appropriate webpack plugins.\n\nYou can deploy your application to any environment that supports Node 8 or above. As an example, to deploy to [Now](https://zeit.co/now), run these commands:\n\n```bash\nnpm install -g now\nnow\n```\n\n\n## Using external components\n\nWhen using Svelte components installed from npm, such as [@sveltejs/svelte-virtual-list](https://github.com/sveltejs/svelte-virtual-list), Svelte needs the original component source (rather than any precompiled JavaScript that ships with the component). This allows the component to be rendered server-side, and also keeps your client-side app smaller.\n\nBecause of that, it's essential that webpack doesn't treat the package as an *external dependency*. You can either modify the `externals` option in [webpack/server.config.js](webpack/server.config.js), or simply install the package to `devDependencies` rather than `dependencies`, which will cause it to get bundled (and therefore compiled) with your app:\n\n```bash\nyarn add -D @sveltejs/svelte-virtual-list\n```\n\n\n## Bugs and feedback\n\nSapper is in early development, and may have the odd rough edge here and there. Please be vocal over on the [Sapper issue tracker](https://github.com/sveltejs/sapper/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foskarrough%2Fr4-sapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foskarrough%2Fr4-sapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foskarrough%2Fr4-sapper/lists"}