Skip to content

Commit 665c983

Browse files
committed
update Sapper
1 parent a13b629 commit 665c983

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+6299
-3948
lines changed

package-lock.json

+5,905
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"glob": "^7.1.2",
4141
"html-entities": "^1.2.1",
4242
"now": "^11.3.8",
43-
"sapper": "^0.15.6",
43+
"sapper": "^0.21.0",
4444
"style-loader": "^0.22.0",
4545
"svelte": "^2.9.11",
4646
"svelte-loader": "^2.10.1",

app/client.js src/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ init({
2020
if (navigator.serviceWorker && navigator.serviceWorker.controller) {
2121
navigator.serviceWorker.controller.onstatechange = function(e) {
2222
if (e.target.state === 'redundant') {
23-
import('../components/Toast.html').then(mod => {
23+
import('./components/Toast.html').then(mod => {
2424
mod.default.show();
2525
});
2626
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/manifest/client.js

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// This file is generated by Sapper — do not edit it!
2+
import root from "../routes/_layout.html";
3+
import error from "../routes/_error.html";
4+
5+
const d = decodeURIComponent;
6+
7+
const index = {
8+
js: () => import(/* webpackChunkName: "index" */ "../routes/index.html"),
9+
css: "__SAPPER_CSS_PLACEHOLDER:index.html__"
10+
};
11+
const guide = {
12+
js: () => import(/* webpackChunkName: "guide" */ "../routes/guide/index.html"),
13+
css: "__SAPPER_CSS_PLACEHOLDER:guide/index.html__"
14+
};
15+
const blog = {
16+
js: () => import(/* webpackChunkName: "blog" */ "../routes/blog/index.html"),
17+
css: "__SAPPER_CSS_PLACEHOLDER:blog/index.html__"
18+
};
19+
const blog_$slug = {
20+
js: () => import(/* webpackChunkName: "blog_$slug" */ "../routes/blog/[slug].html"),
21+
css: "__SAPPER_CSS_PLACEHOLDER:blog/[slug].html__"
22+
};
23+
const repl = {
24+
js: () => import(/* webpackChunkName: "repl" */ "../routes/repl/index.html"),
25+
css: "__SAPPER_CSS_PLACEHOLDER:repl/index.html__"
26+
};
27+
28+
export const manifest = {
29+
ignore: [/^\/blog\/rss.xml$/, /^\/gist\/create$/, /^\/gist\/([^\/]+?)$/, /^\/api\/examples\/([^\/]+?)$/, /^\/api\/guide$/, /^\/api\/guide\/contents$/, /^\/api\/guide\/demo\/([^\/]+?)$/, /^\/api\/blog$/, /^\/api\/blog\/([^\/]+?)$/],
30+
31+
pages: [
32+
{
33+
// index.html
34+
pattern: /^\/?$/,
35+
parts: [
36+
{ component: index }
37+
]
38+
},
39+
40+
{
41+
// guide/index.html
42+
pattern: /^\/guide\/?$/,
43+
parts: [
44+
null,
45+
{ component: guide }
46+
]
47+
},
48+
49+
{
50+
// blog/index.html
51+
pattern: /^\/blog\/?$/,
52+
parts: [
53+
null,
54+
{ component: blog }
55+
]
56+
},
57+
58+
{
59+
// blog/[slug].html
60+
pattern: /^\/blog\/([^\/]+?)\/?$/,
61+
parts: [
62+
null,
63+
{ component: blog_$slug, params: match => ({ slug: d(match[1]) }) }
64+
]
65+
},
66+
67+
{
68+
// repl/index.html
69+
pattern: /^\/repl\/?$/,
70+
parts: [
71+
null,
72+
{ component: repl }
73+
]
74+
}
75+
],
76+
77+
root,
78+
79+
error
80+
};
81+
82+
// this is included for legacy reasons
83+
export const routes = {};
84+
85+
import("/Users/208311/Development/SVELTE/svelte.technology/node_modules/sapper/sapper-dev-client.js").then(client => {
86+
client.connect(10000);
87+
});

src/manifest/default-layout.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<svelte:component this={child.component} {...child.props}/>

src/manifest/server.js

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
// This file is generated by Sapper — do not edit it!
2+
import * as route_blog_rss_xml from "../routes/blog/rss.xml.js";
3+
import * as route_gist_create from "../routes/gist/create.js";
4+
import * as route_gist_$id from "../routes/gist/[id].js";
5+
import * as route_api_examples_$slug from "../routes/api/examples/[slug].js";
6+
import * as route_api_guide from "../routes/api/guide/index.js";
7+
import * as route_api_guide_contents from "../routes/api/guide/contents.js";
8+
import * as route_api_guide_demo_$hash from "../routes/api/guide/demo/[hash].js";
9+
import * as route_api_blog from "../routes/api/blog/index.js";
10+
import * as route_api_blog_$slug from "../routes/api/blog/[slug].js";
11+
import index from "../routes/index.html";
12+
import guide from "../routes/guide/index.html";
13+
import blog from "../routes/blog/index.html";
14+
import blog_$slug from "../routes/blog/[slug].html";
15+
import repl from "../routes/repl/index.html";
16+
import root from "../routes/_layout.html";
17+
import error from "../routes/_error.html";
18+
19+
const d = decodeURIComponent;
20+
21+
export const manifest = {
22+
server_routes: [
23+
{
24+
// blog/rss.xml.js
25+
pattern: /^\/blog\/rss.xml$/,
26+
handlers: route_blog_rss_xml,
27+
params: () => ({})
28+
},
29+
30+
{
31+
// gist/create.js
32+
pattern: /^\/gist\/create$/,
33+
handlers: route_gist_create,
34+
params: () => ({})
35+
},
36+
37+
{
38+
// gist/[id].js
39+
pattern: /^\/gist\/([^\/]+?)$/,
40+
handlers: route_gist_$id,
41+
params: match => ({ id: d(match[1]) })
42+
},
43+
44+
{
45+
// api/examples/[slug].js
46+
pattern: /^\/api\/examples\/([^\/]+?)$/,
47+
handlers: route_api_examples_$slug,
48+
params: match => ({ slug: d(match[1]) })
49+
},
50+
51+
{
52+
// api/guide/index.js
53+
pattern: /^\/api\/guide$/,
54+
handlers: route_api_guide,
55+
params: () => ({})
56+
},
57+
58+
{
59+
// api/guide/contents.js
60+
pattern: /^\/api\/guide\/contents$/,
61+
handlers: route_api_guide_contents,
62+
params: () => ({})
63+
},
64+
65+
{
66+
// api/guide/demo/[hash].js
67+
pattern: /^\/api\/guide\/demo\/([^\/]+?)$/,
68+
handlers: route_api_guide_demo_$hash,
69+
params: match => ({ hash: d(match[1]) })
70+
},
71+
72+
{
73+
// api/blog/index.js
74+
pattern: /^\/api\/blog$/,
75+
handlers: route_api_blog,
76+
params: () => ({})
77+
},
78+
79+
{
80+
// api/blog/[slug].js
81+
pattern: /^\/api\/blog\/([^\/]+?)$/,
82+
handlers: route_api_blog_$slug,
83+
params: match => ({ slug: d(match[1]) })
84+
}
85+
],
86+
87+
pages: [
88+
{
89+
// index.html
90+
pattern: /^\/?$/,
91+
parts: [
92+
{ name: "index", file: "index.html", component: index }
93+
]
94+
},
95+
96+
{
97+
// guide/index.html
98+
pattern: /^\/guide\/?$/,
99+
parts: [
100+
null,
101+
{ name: "guide", file: "guide/index.html", component: guide }
102+
]
103+
},
104+
105+
{
106+
// blog/index.html
107+
pattern: /^\/blog\/?$/,
108+
parts: [
109+
null,
110+
{ name: "blog", file: "blog/index.html", component: blog }
111+
]
112+
},
113+
114+
{
115+
// blog/[slug].html
116+
pattern: /^\/blog\/([^\/]+?)\/?$/,
117+
parts: [
118+
null,
119+
{ name: "blog_$slug", file: "blog/[slug].html", component: blog_$slug, params: match => ({ slug: d(match[1]) }) }
120+
]
121+
},
122+
123+
{
124+
// repl/index.html
125+
pattern: /^\/repl\/?$/,
126+
parts: [
127+
null,
128+
{ name: "repl", file: "repl/index.html", component: repl }
129+
]
130+
}
131+
],
132+
133+
root,
134+
135+
error
136+
};
137+
138+
// this is included for legacy reasons
139+
export const routes = {};

src/manifest/service-worker.js

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// This file is generated by Sapper — do not edit it!
2+
export const timestamp = 1537756541015;
3+
4+
export const files = [
5+
"curl.js",
6+
"favicon.ico",
7+
"favicon.png",
8+
"fonts/Inconsolata/Inconsolata-Bold.woff",
9+
"fonts/Inconsolata/Inconsolata-Bold.woff2",
10+
"fonts/Inconsolata/Inconsolata-Regular.woff",
11+
"fonts/Inconsolata/Inconsolata-Regular.woff2",
12+
"fonts/Inconsolata/OFL.txt",
13+
"fonts/Rajdhani/Rajdhani-Bold.woff",
14+
"fonts/Rajdhani/Rajdhani-Bold.woff2",
15+
"fonts/Rajdhani/Rajdhani-Medium.woff",
16+
"fonts/Rajdhani/Rajdhani-Medium.woff2",
17+
"fonts/Rajdhani/Rajdhani-Regular.woff",
18+
"fonts/Rajdhani/Rajdhani-Regular.woff2",
19+
"fonts/Roboto/Roboto-Bold.woff",
20+
"fonts/Roboto/Roboto-Bold.woff2",
21+
"fonts/Roboto/Roboto-Light.woff",
22+
"fonts/Roboto/Roboto-Light.woff2",
23+
"fonts/Roboto/Roboto-LightItalic.woff",
24+
"fonts/Roboto/Roboto-LightItalic.woff2",
25+
"icons/check.svg",
26+
"icons/collapse.svg",
27+
"icons/download.svg",
28+
"icons/dropdown.svg",
29+
"icons/expand.svg",
30+
"icons/flip.svg",
31+
"icons/fork.svg",
32+
"icons/link.svg",
33+
"icons/save.svg",
34+
"images/twitter-card.png",
35+
"manifest.json",
36+
"repl-viewer.css",
37+
"svelte-app.json",
38+
"svelte-logo-192.png",
39+
"svelte-logo-512.png"
40+
];
41+
export { files as assets }; // legacy
42+
43+
export const shell = [
44+
"client/f68b51b6b4627c0055fe/main.js",
45+
"client/b138fe4e9b98d660e6b3.worker.js",
46+
"client/svelte.b138fe4e9b98d660e6b3.worker.js",
47+
"client/f68b51b6b4627c0055fe/blog.blog.js",
48+
"client/f68b51b6b4627c0055fe/blog_$slug.blog_$slug.js",
49+
"client/f68b51b6b4627c0055fe/codemirror.codemirror.js",
50+
"client/f68b51b6b4627c0055fe/guide.guide.js",
51+
"client/f68b51b6b4627c0055fe/index.index.js",
52+
"client/rollup.b138fe4e9b98d660e6b3.worker.js",
53+
"client/f68b51b6b4627c0055fe/0.0.js",
54+
"client/f68b51b6b4627c0055fe/1.1.js",
55+
"client/f68b51b6b4627c0055fe/2.2.js",
56+
"client/f68b51b6b4627c0055fe/3.3.js",
57+
"client/f68b51b6b4627c0055fe/repl.repl.js",
58+
"client/f68b51b6b4627c0055fe/vendors~codemirror.vendors~codemirror.js",
59+
"client/f68b51b6b4627c0055fe/vendors~repl.vendors~repl.js"
60+
];
61+
62+
export const routes = [
63+
{ pattern: /^\/?$/ },
64+
{ pattern: /^\/guide\/?$/ },
65+
{ pattern: /^\/blog\/?$/ },
66+
{ pattern: /^\/blog\/([^\/]+?)\/?$/ },
67+
{ pattern: /^\/repl\/?$/ }
68+
];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

routes/api/examples/[slug].js src/routes/api/examples/[slug].js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from 'fs';
22
import path from 'path';
3-
import manifest from '../../../content/examples/manifest.json';
3+
import manifest from '../../../../content/examples/manifest.json';
44

55
const lookup = new Map();
66
const titles = new Map();
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

routes/repl/index.html src/routes/repl/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ <h2 class='show-if-mobile'>data.json5</h2>
221221
import ComponentSelector from './_components/ComponentSelector.html';
222222
import AppControls from './_components/AppControls.html';
223223
import SplitPane from './_components/SplitPane.html';
224-
import examples from '../../content/examples/manifest.json';
224+
import examples from '../../../content/examples/manifest.json';
225225

226226
const slugs = new Set();
227227
examples.forEach(group => {

app/server.js src/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if (process.env.GITHUB_CLIENT_ID) {
9898

9999
app.use(
100100
compression({ threshold: 0 }),
101-
serve('assets'),
101+
serve('static'),
102102
sapper({
103103
manifest,
104104
store: req => {
File renamed without changes.
File renamed without changes.
File renamed without changes.

assets/curl.js static/curl.js

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

static/svelte-app.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"path":"README.md","data":"*Psst — looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)*\n\n---\n\n# svelte app\n\nThis is a project template for [Svelte](https://svelte.technology) apps. It lives at https://github.com/sveltejs/template.\n\nTo create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):\n\n```bash\nnpm install -g degit # you only need to do this once\n\ndegit sveltejs/template svelte-app\ncd svelte-app\n```\n\n*Note that you will need to have [Node.js](https://nodejs.org) installed.*\n\n\n## Get started\n\nInstall the dependencies...\n\n```bash\ncd svelte-app\nnpm install\n```\n\n...then start [Rollup](https://rollupjs.org):\n\n```bash\nnpm run dev\n```\n\nNavigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.\n\n\n## Deploying to the web\n\n### With [now](https://zeit.co/now)\n\nInstall `now` if you haven't already:\n\n```bash\nnpm install -g now\n```\n\nThen, from within your project folder:\n\n```bash\nnow\n```\n\nAs an alternative, use the [Now desktop client](https://zeit.co/download) and simply drag the unzipped project folder to the taskbar icon.\n\n### With [surge](https://surge.sh/)\n\nInstall `surge` if you haven't already:\n\n```bash\nnpm install -g surge\n```\n\nThen, from within your project folder:\n\n```bash\nnpm run build\nsurge public\n```\n"},{"path":"rollup.config.js","data":"import svelte from 'rollup-plugin-svelte';\nimport resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport buble from 'rollup-plugin-buble';\nimport uglify from 'rollup-plugin-uglify';\n\nconst production = !process.env.ROLLUP_WATCH;\n\nexport default {\n\tinput: 'src/main.js',\n\toutput: {\n\t\tsourcemap: true,\n\t\tformat: 'iife',\n\t\tname: 'app',\n\t\tfile: 'public/bundle.js'\n\t},\n\tplugins: [\n\t\tsvelte({\n\t\t\t// opt in to v3 behaviour today\n\t\t\tskipIntroByDefault: true,\n\t\t\tnestedTransitions: true,\n\n\t\t\t// enable run-time checks when not in production\n\t\t\tdev: !production,\n\t\t\t// we'll extract any component CSS out into\n\t\t\t// a separate file — better for performance\n\t\t\tcss: css => {\n\t\t\t\tcss.write('public/bundle.css');\n\t\t\t}\n\t\t}),\n\n\t\t// If you have external dependencies installed from\n\t\t// npm, you'll most likely need these plugins. In\n\t\t// some cases you'll need additional configuration —\n\t\t// consult the documentation for details:\n\t\t// https://github.com/rollup/rollup-plugin-commonjs\n\t\tresolve(),\n\t\tcommonjs(),\n\n\t\t// If we're building for production (npm run build\n\t\t// instead of npm run dev), transpile and minify\n\t\tproduction && buble({ include: ['src/**', 'node_modules/svelte/shared.js'] }),\n\t\tproduction && uglify()\n\t]\n};\n"},{"path":"public/index.html","data":"<!doctype html>\n<html>\n<head>\n\t<meta charset='utf8'>\n\t<meta name='viewport' content='width=device-width'>\n\n\t<title>Svelte app</title>\n\n\t<link rel='stylesheet' href='global.css'>\n\t<link rel='stylesheet' href='bundle.css'>\n</head>\n\n<body>\n\t<script src='bundle.js'></script>\n</body>\n</html>"},{"path":"public/global.css","data":"html, body {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\nbody {\n\tcolor: #333;\n\tmargin: 0;\n\tpadding: 8px;\n\tbox-sizing: border-box;\n\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n}\n\na {\n\tcolor: rgb(0,100,200);\n\ttext-decoration: none;\n}\n\na:hover {\n\ttext-decoration: underline;\n}\n\na:visited {\n\tcolor: rgb(0,80,160);\n}\n\nlabel {\n\tdisplay: block;\n}\n\ninput, button, select, textarea {\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tpadding: 0.4em;\n\tmargin: 0 0 0.5em 0;\n\tbox-sizing: border-box;\n\tborder: 1px solid #ccc;\n\tborder-radius: 2px;\n}\n\ninput:disabled {\n\tcolor: #ccc;\n}\n\ninput[type=\"range\"] {\n\theight: 0;\n}\n\nbutton {\n\tbackground-color: #f4f4f4;\n\toutline: none;\n}\n\nbutton:active {\n\tbackground-color: #ddd;\n}\n\nbutton:focus {\n\tborder-color: #666;\n}"},{"path":"package.json","data":"{\n \"name\": \"svelte-app\",\n \"version\": \"1.0.0\",\n \"devDependencies\": {\n \"rollup\": \"^0.58.2\",\n \"rollup-plugin-buble\": \"^0.19.2\",\n \"rollup-plugin-commonjs\": \"^9.1.3\",\n \"rollup-plugin-node-resolve\": \"^3.0.3\",\n \"rollup-plugin-svelte\": \"^4.0.0\",\n \"rollup-plugin-uglify\": \"^3.0.0\",\n \"npm-run-all\": \"^4.1.3\",\n \"serve\": \"^6.5.6\",\n \"svelte\": \"^2.6.0\"\n },\n \"scripts\": {\n \"build\": \"rollup -c\",\n \"autobuild\": \"rollup -c -w\",\n \"dev\": \"run-p start autobuild\",\n \"start\": \"serve public\"\n }\n}\n"}]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)