├── .gitignore ├── sample-app ├── cypress.json ├── config │ ├── default.js │ └── prod.js ├── static │ ├── favicon.png │ ├── logo-192.png │ ├── logo-512.png │ ├── great-success.png │ └── manifest.json ├── src │ ├── client.js │ ├── routes │ │ ├── about.svelte │ │ ├── configuration.svelte │ │ ├── api │ │ │ ├── logout.js │ │ │ ├── secret-data.js │ │ │ └── authenticate.js │ │ ├── preprocess.svelte │ │ ├── blog │ │ │ ├── index.json.js │ │ │ ├── [slug].json.js │ │ │ ├── index.svelte │ │ │ ├── [slug].svelte │ │ │ └── _posts.js │ │ ├── _layout.svelte │ │ ├── _error.svelte │ │ ├── authentication.svelte │ │ ├── index.svelte │ │ ├── secret-page.svelte │ │ └── validation.svelte │ ├── node_modules │ │ └── validator │ │ │ ├── validators.js │ │ │ └── validate.js │ ├── scss │ │ └── global.scss │ ├── server.js │ ├── template.html │ ├── components │ │ └── Nav.svelte │ └── service-worker.js ├── .gitignore ├── cypress │ ├── fixtures │ │ └── example.json │ ├── integration │ │ └── spec.js │ ├── plugins │ │ └── index.js │ └── support │ │ ├── index.js │ │ └── commands.js ├── appveyor.yml ├── package.json ├── rollup.config.js ├── README.md └── package-lock.json ├── static ├── images │ ├── bad-validation.png │ ├── deviantart-errors.png │ ├── logo.svg │ ├── svelte-preprocess.svg │ ├── rollup-plugin-replace.svg │ └── async-script-loader.svg ├── fonts │ ├── raleway-v14-latin-600.woff │ ├── catamaran-v6-latin-500.woff │ ├── catamaran-v6-latin-500.woff2 │ ├── catamaran-v6-latin-900.woff │ ├── catamaran-v6-latin-900.woff2 │ ├── raleway-v14-latin-600.woff2 │ ├── catamaran-v6-latin-regular.woff │ ├── lobster-v22-latin-regular.woff │ ├── lobster-v22-latin-regular.woff2 │ ├── raleway-v14-latin-regular.woff │ ├── raleway-v14-latin-regular.woff2 │ ├── ubuntu-mono-v9-latin-700.woff │ ├── ubuntu-mono-v9-latin-700.woff2 │ ├── catamaran-v6-latin-regular.woff2 │ ├── ubuntu-mono-v9-latin-regular.woff │ ├── ubuntu-mono-v9-latin-700italic.woff │ ├── ubuntu-mono-v9-latin-700italic.woff2 │ └── ubuntu-mono-v9-latin-regular.woff2 └── css │ └── fonts.css ├── package.json └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /sample-app/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:3000", 3 | "video": false 4 | } -------------------------------------------------------------------------------- /sample-app/config/default.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | VEG_TYPE: 'Peas' 5 | } -------------------------------------------------------------------------------- /sample-app/config/prod.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | VEG_TYPE: 'Squash' 5 | } -------------------------------------------------------------------------------- /sample-app/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/sample-app/static/favicon.png -------------------------------------------------------------------------------- /sample-app/static/logo-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/sample-app/static/logo-192.png -------------------------------------------------------------------------------- /sample-app/static/logo-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/sample-app/static/logo-512.png -------------------------------------------------------------------------------- /static/images/bad-validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/images/bad-validation.png -------------------------------------------------------------------------------- /sample-app/src/client.js: -------------------------------------------------------------------------------- 1 | import * as sapper from '@sapper/app'; 2 | 3 | sapper.start({ 4 | target: document.querySelector('#sapper') 5 | }); -------------------------------------------------------------------------------- /sample-app/static/great-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/sample-app/static/great-success.png -------------------------------------------------------------------------------- /static/images/deviantart-errors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/images/deviantart-errors.png -------------------------------------------------------------------------------- /static/fonts/raleway-v14-latin-600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/raleway-v14-latin-600.woff -------------------------------------------------------------------------------- /static/fonts/catamaran-v6-latin-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/catamaran-v6-latin-500.woff -------------------------------------------------------------------------------- /static/fonts/catamaran-v6-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/catamaran-v6-latin-500.woff2 -------------------------------------------------------------------------------- /static/fonts/catamaran-v6-latin-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/catamaran-v6-latin-900.woff -------------------------------------------------------------------------------- /static/fonts/catamaran-v6-latin-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/catamaran-v6-latin-900.woff2 -------------------------------------------------------------------------------- /static/fonts/raleway-v14-latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/raleway-v14-latin-600.woff2 -------------------------------------------------------------------------------- /static/fonts/catamaran-v6-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/catamaran-v6-latin-regular.woff -------------------------------------------------------------------------------- /static/fonts/lobster-v22-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/lobster-v22-latin-regular.woff -------------------------------------------------------------------------------- /static/fonts/lobster-v22-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/lobster-v22-latin-regular.woff2 -------------------------------------------------------------------------------- /static/fonts/raleway-v14-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/raleway-v14-latin-regular.woff -------------------------------------------------------------------------------- /static/fonts/raleway-v14-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/raleway-v14-latin-regular.woff2 -------------------------------------------------------------------------------- /static/fonts/ubuntu-mono-v9-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/ubuntu-mono-v9-latin-700.woff -------------------------------------------------------------------------------- /static/fonts/ubuntu-mono-v9-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/ubuntu-mono-v9-latin-700.woff2 -------------------------------------------------------------------------------- /static/fonts/catamaran-v6-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/catamaran-v6-latin-regular.woff2 -------------------------------------------------------------------------------- /static/fonts/ubuntu-mono-v9-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/ubuntu-mono-v9-latin-regular.woff -------------------------------------------------------------------------------- /static/fonts/ubuntu-mono-v9-latin-700italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/ubuntu-mono-v9-latin-700italic.woff -------------------------------------------------------------------------------- /static/fonts/ubuntu-mono-v9-latin-700italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/ubuntu-mono-v9-latin-700italic.woff2 -------------------------------------------------------------------------------- /static/fonts/ubuntu-mono-v9-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antony/svelte-meetup-talk-oct-2019/HEAD/static/fonts/ubuntu-mono-v9-latin-regular.woff2 -------------------------------------------------------------------------------- /sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /node_modules/ 3 | /src/node_modules/@sapper/ 4 | !/src/node_modules 5 | yarn-error.log 6 | /cypress/screenshots/ 7 | /__sapper__/ 8 | -------------------------------------------------------------------------------- /sample-app/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.

-------------------------------------------------------------------------------- /sample-app/src/routes/configuration.svelte: -------------------------------------------------------------------------------- 1 | 2 | Configuration 3 | 4 | 5 |

Configuration

6 | 7 |

This is a configured value: {process.env.VEG_TYPE}

-------------------------------------------------------------------------------- /sample-app/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /sample-app/src/routes/api/logout.js: -------------------------------------------------------------------------------- 1 | export async function get(req, res, next) { 2 | const jwt = req.cookies['token'] 3 | res.setHeader('Set-Cookie', `token=${jwt}; HttpOnly; Path=/; Max-Age=0`) 4 | res.end() 5 | } -------------------------------------------------------------------------------- /sample-app/src/routes/api/secret-data.js: -------------------------------------------------------------------------------- 1 | export async function get(req, res, next) { 2 | const jwt = req.cookies['token'] 3 | if (!jwt) { return res.status(403).end() } 4 | res.end(JSON.stringify({ secret: 'fish' })) 5 | } -------------------------------------------------------------------------------- /sample-app/src/routes/preprocess.svelte: -------------------------------------------------------------------------------- 1 | 2 | About 3 | 4 | 5 |

SCSS Preprocessing

6 | 7 |

This page uses SCSS for its styling

8 | 9 | -------------------------------------------------------------------------------- /sample-app/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | shallow_clone: true 4 | 5 | init: 6 | - git config --global core.autocrlf false 7 | 8 | build: off 9 | 10 | environment: 11 | matrix: 12 | # node.js 13 | - nodejs_version: stable 14 | 15 | install: 16 | - ps: Install-Product node $env:nodejs_version 17 | - npm install cypress 18 | - npm install 19 | -------------------------------------------------------------------------------- /sample-app/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 | } -------------------------------------------------------------------------------- /sample-app/src/routes/api/authenticate.js: -------------------------------------------------------------------------------- 1 | const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFudG9ueSBKb25lcyIsImlhdCI6MTUxNjIzOTAyMn0.lRDwwE5SA3Pe6F0DWS7hKJBPxr5UESxkf3VTqPsemaE' 2 | 3 | export async function get(req, res, next) { 4 | const inAnHour = new Date() 5 | inAnHour.setHours(inAnHour.getHours() + 1) 6 | res.setHeader('Set-Cookie', `token=${jwt}; HttpOnly; Path=/`) 7 | res.end() 8 | } -------------------------------------------------------------------------------- /sample-app/static/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "background_color": "#ffffff", 3 | "theme_color": "#333333", 4 | "name": "TODO", 5 | "short_name": "TODO", 6 | "display": "minimal-ui", 7 | "start_url": "/", 8 | "icons": [ 9 | { 10 | "src": "logo-192.png", 11 | "sizes": "192x192", 12 | "type": "image/png" 13 | }, 14 | { 15 | "src": "logo-512.png", 16 | "sizes": "512x512", 17 | "type": "image/png" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /sample-app/src/routes/_layout.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 21 | 22 |