├── .gitignore ├── cypress.json ├── src ├── manifest │ ├── default-layout.html │ ├── server.js │ ├── client.js │ └── service-worker.js ├── routes │ ├── _error.html │ ├── guide │ │ ├── index.json.js │ │ ├── _process_markdown.js │ │ ├── _sections.js │ │ └── index.html │ ├── _layout.html │ └── index.html ├── client.js ├── server.js ├── components │ ├── Toast.html │ ├── GuideContents.html │ └── Nav.html ├── service-worker.js └── template.html ├── static ├── favicon.ico ├── favicon.png ├── sapper-logo-192.png ├── sapper-logo-512.png ├── images │ └── twitter-card.png ├── fonts │ ├── Roboto │ │ ├── Roboto-Bold.woff │ │ ├── Roboto-Bold.woff2 │ │ ├── Roboto-Light.woff │ │ ├── Roboto-Light.woff2 │ │ ├── Roboto-LightItalic.woff │ │ └── Roboto-LightItalic.woff2 │ ├── Rajdhani │ │ ├── Rajdhani-Bold.woff │ │ ├── Rajdhani-Bold.woff2 │ │ ├── Rajdhani-Medium.woff │ │ ├── Rajdhani-Medium.woff2 │ │ ├── Rajdhani-Regular.woff │ │ └── Rajdhani-Regular.woff2 │ └── Inconsolata │ │ ├── Inconsolata-Bold.woff │ │ ├── Inconsolata-Bold.woff2 │ │ ├── Inconsolata-Regular.woff │ │ ├── Inconsolata-Regular.woff2 │ │ └── OFL.txt ├── package.json ├── manifest.json └── global.css ├── cypress ├── fixtures │ └── example.json ├── integration │ └── spec.js ├── plugins │ └── index.js └── support │ ├── index.js │ └── commands.js ├── .travis.yml ├── appveyor.yml ├── content └── guide │ ├── 14-testing.md │ ├── 15-debugging.md │ ├── 09-building.md │ ├── 13-base-urls.md │ ├── 08-prefetching.md │ ├── 12-security.md │ ├── 06-server-side-rendering.md │ ├── 11-deploying.md │ ├── 07-state-management.md │ ├── 03-client-api.md │ ├── 00-introduction.md │ ├── 10-exporting.md │ ├── 05-layouts.md │ ├── 02-routing.md │ ├── 04-preloading.md │ ├── 01-structure.md │ └── 16-migrating.md ├── README.md ├── LICENSE ├── package.json └── rollup.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | yarn.lock 4 | cypress/screenshots 5 | __sapper__ -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:3000", 3 | "videoRecording": false 4 | } -------------------------------------------------------------------------------- /src/manifest/default-layout.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/favicon.ico -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/favicon.png -------------------------------------------------------------------------------- /static/sapper-logo-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/sapper-logo-192.png -------------------------------------------------------------------------------- /static/sapper-logo-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/sapper-logo-512.png -------------------------------------------------------------------------------- /static/images/twitter-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/images/twitter-card.png -------------------------------------------------------------------------------- /static/fonts/Roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /static/fonts/Roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /static/fonts/Roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /static/fonts/Roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /static/fonts/Rajdhani/Rajdhani-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Rajdhani/Rajdhani-Bold.woff -------------------------------------------------------------------------------- /static/fonts/Rajdhani/Rajdhani-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Rajdhani/Rajdhani-Bold.woff2 -------------------------------------------------------------------------------- /static/fonts/Rajdhani/Rajdhani-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Rajdhani/Rajdhani-Medium.woff -------------------------------------------------------------------------------- /static/fonts/Rajdhani/Rajdhani-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Rajdhani/Rajdhani-Medium.woff2 -------------------------------------------------------------------------------- /static/fonts/Rajdhani/Rajdhani-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Rajdhani/Rajdhani-Regular.woff -------------------------------------------------------------------------------- /static/fonts/Roboto/Roboto-LightItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Roboto/Roboto-LightItalic.woff -------------------------------------------------------------------------------- /static/fonts/Inconsolata/Inconsolata-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Inconsolata/Inconsolata-Bold.woff -------------------------------------------------------------------------------- /static/fonts/Rajdhani/Rajdhani-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Rajdhani/Rajdhani-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/Roboto/Roboto-LightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Roboto/Roboto-LightItalic.woff2 -------------------------------------------------------------------------------- /static/fonts/Inconsolata/Inconsolata-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Inconsolata/Inconsolata-Bold.woff2 -------------------------------------------------------------------------------- /static/fonts/Inconsolata/Inconsolata-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Inconsolata/Inconsolata-Regular.woff -------------------------------------------------------------------------------- /static/fonts/Inconsolata/Inconsolata-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sveltejs/sapper-legacy.svelte.dev/master/static/fonts/Inconsolata/Inconsolata-Regular.woff2 -------------------------------------------------------------------------------- /static/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sapper.svelte.technology", 3 | "scripts": { 4 | "start": "serve ." 5 | }, 6 | "dependencies": { 7 | "serve": "latest" 8 | } 9 | } -------------------------------------------------------------------------------- /src/routes/_error.html: -------------------------------------------------------------------------------- 1 | 2 | Sapper • Military-grade progressive web apps, powered by Svelte 3 | 4 | 5 |

{status}

6 |

{error.message}

-------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "stable" 5 | env: 6 | global: 7 | - BUILD_TIMEOUT=10000 8 | install: 9 | - npm install 10 | branches: 11 | only: 12 | - master 13 | script: npm run deploy:ci -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/routes/guide/index.json.js: -------------------------------------------------------------------------------- 1 | import sections from './_sections.js'; 2 | 3 | const dev = process.env.NODE_ENV === 'development'; 4 | let json; 5 | 6 | export function get(req, res) { 7 | if (dev || !json) { 8 | json = JSON.stringify(sections()); 9 | } 10 | 11 | res.set({ 12 | 'Content-Type': 'application/json', 13 | 'Cache-Control': `max-age=${30 * 60 * 1e3}` // 30 minutes 14 | }); 15 | res.end(json); 16 | } -------------------------------------------------------------------------------- /static/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "background_color": "#ffffff", 3 | "theme_color": "#aa1e1e", 4 | "name": "Sapper", 5 | "short_name": "Sapper", 6 | "display": "minimal-ui", 7 | "start_url": "/", 8 | "icons": [ 9 | { 10 | "src": "sapper-logo-192.png", 11 | "sizes": "192x192", 12 | "type": "image/png" 13 | }, 14 | { 15 | "src": "sapper-logo-512.png", 16 | "sizes": "512x512", 17 | "type": "image/png" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/routes/_layout.html: -------------------------------------------------------------------------------- 1 |