├── static ├── favicon.png ├── logo-192.png ├── logo-512.png ├── manifest.json └── global.css ├── .gitignore ├── src ├── client.js ├── node_modules │ └── images │ │ └── successkid.jpg ├── routes │ ├── about.svelte │ ├── blog │ │ ├── index.json.js │ │ ├── [slug].json.js │ │ ├── index.svelte │ │ ├── [slug].svelte │ │ └── _posts.js │ ├── _layout.svelte │ ├── _error.svelte │ └── index.svelte ├── server.js ├── ambient.d.ts ├── template.html ├── components │ └── Nav.svelte └── service-worker.js ├── package.json ├── webpack.config.js ├── README.md └── scripts └── setupTypeScript.js /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-template-webpack/master/static/favicon.png -------------------------------------------------------------------------------- /static/logo-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-template-webpack/master/static/logo-192.png -------------------------------------------------------------------------------- /static/logo-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-template-webpack/master/static/logo-512.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /node_modules/ 3 | /src/node_modules/@sapper/ 4 | yarn-error.log 5 | /__sapper__/ 6 | -------------------------------------------------------------------------------- /src/client.js: -------------------------------------------------------------------------------- 1 | import * as sapper from '@sapper/app'; 2 | 3 | sapper.start({ 4 | target: document.querySelector('#sapper') 5 | }); -------------------------------------------------------------------------------- /src/node_modules/images/successkid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-template-webpack/master/src/node_modules/images/successkid.jpg -------------------------------------------------------------------------------- /src/routes/about.svelte: -------------------------------------------------------------------------------- 1 | 2 | About 3 | 4 | 5 |

About this site

6 | 7 |

This is the 'about' page. There's not much here.

-------------------------------------------------------------------------------- /src/routes/blog/index.json.js: -------------------------------------------------------------------------------- 1 | import posts from './_posts.js'; 2 | 3 | const contents = JSON.stringify(posts.map(post => { 4 | return { 5 | title: post.title, 6 | slug: post.slug 7 | }; 8 | })); 9 | 10 | export function get(req, res) { 11 | res.writeHead(200, { 12 | 'Content-Type': 'application/json' 13 | }); 14 | 15 | res.end(contents); 16 | } -------------------------------------------------------------------------------- /src/routes/_layout.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 |