Showing
13 changed files
with
921 additions
and
2 deletions
... | @@ -15,6 +15,15 @@ services: | ... | @@ -15,6 +15,15 @@ services: |
15 | restart: on-failure | 15 | restart: on-failure |
16 | links: | 16 | links: |
17 | - app | 17 | - app |
18 | + | ||
19 | + svelte: | ||
20 | + image: node | ||
21 | + container_name: svelte | ||
22 | + working_dir: /var/www/html | ||
23 | + volumes: | ||
24 | + - ./web:/var/www/html | ||
25 | + command: bash -c "npm install && npm run dev" | ||
26 | + restart: on-failure | ||
18 | 27 | ||
19 | app: | 28 | app: |
20 | image: node | 29 | image: node | ... | ... |
app/web/.gitignore
0 → 100644
app/web/README.md
0 → 100644
1 | +*Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)* | ||
2 | + | ||
3 | +--- | ||
4 | + | ||
5 | +# svelte app | ||
6 | + | ||
7 | +This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template. | ||
8 | + | ||
9 | +To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit): | ||
10 | + | ||
11 | +```bash | ||
12 | +npx degit sveltejs/template svelte-app | ||
13 | +cd svelte-app | ||
14 | +``` | ||
15 | + | ||
16 | +*Note that you will need to have [Node.js](https://nodejs.org) installed.* | ||
17 | + | ||
18 | + | ||
19 | +## Get started | ||
20 | + | ||
21 | +Install the dependencies... | ||
22 | + | ||
23 | +```bash | ||
24 | +cd svelte-app | ||
25 | +npm install | ||
26 | +``` | ||
27 | + | ||
28 | +...then start [Rollup](https://rollupjs.org): | ||
29 | + | ||
30 | +```bash | ||
31 | +npm run dev | ||
32 | +``` | ||
33 | + | ||
34 | +Navigate 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. | ||
35 | + | ||
36 | +By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`. | ||
37 | + | ||
38 | + | ||
39 | +## Building and running in production mode | ||
40 | + | ||
41 | +To create an optimised version of the app: | ||
42 | + | ||
43 | +```bash | ||
44 | +npm run build | ||
45 | +``` | ||
46 | + | ||
47 | +You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com). | ||
48 | + | ||
49 | + | ||
50 | +## Single-page app mode | ||
51 | + | ||
52 | +By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere. | ||
53 | + | ||
54 | +If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json: | ||
55 | + | ||
56 | +```js | ||
57 | +"start": "sirv public --single" | ||
58 | +``` | ||
59 | + | ||
60 | + | ||
61 | +## Deploying to the web | ||
62 | + | ||
63 | +### With [now](https://zeit.co/now) | ||
64 | + | ||
65 | +Install `now` if you haven't already: | ||
66 | + | ||
67 | +```bash | ||
68 | +npm install -g now | ||
69 | +``` | ||
70 | + | ||
71 | +Then, from within your project folder: | ||
72 | + | ||
73 | +```bash | ||
74 | +cd public | ||
75 | +now deploy --name my-project | ||
76 | +``` | ||
77 | + | ||
78 | +As an alternative, use the [Now desktop client](https://zeit.co/download) and simply drag the unzipped project folder to the taskbar icon. | ||
79 | + | ||
80 | +### With [surge](https://surge.sh/) | ||
81 | + | ||
82 | +Install `surge` if you haven't already: | ||
83 | + | ||
84 | +```bash | ||
85 | +npm install -g surge | ||
86 | +``` | ||
87 | + | ||
88 | +Then, from within your project folder: | ||
89 | + | ||
90 | +```bash | ||
91 | +npm run build | ||
92 | +surge public my-project.surge.sh | ||
93 | +``` |
app/web/index.html
deleted
100644 → 0
1 | -hello world | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/web/package-lock.json
0 → 100644
1 | +{ | ||
2 | + "name": "svelte-app", | ||
3 | + "version": "1.0.0", | ||
4 | + "lockfileVersion": 1, | ||
5 | + "requires": true, | ||
6 | + "dependencies": { | ||
7 | + "@babel/code-frame": { | ||
8 | + "version": "7.8.3", | ||
9 | + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", | ||
10 | + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", | ||
11 | + "dev": true, | ||
12 | + "requires": { | ||
13 | + "@babel/highlight": "^7.8.3" | ||
14 | + } | ||
15 | + }, | ||
16 | + "@babel/helper-validator-identifier": { | ||
17 | + "version": "7.9.5", | ||
18 | + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", | ||
19 | + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", | ||
20 | + "dev": true | ||
21 | + }, | ||
22 | + "@babel/highlight": { | ||
23 | + "version": "7.9.0", | ||
24 | + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", | ||
25 | + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", | ||
26 | + "dev": true, | ||
27 | + "requires": { | ||
28 | + "@babel/helper-validator-identifier": "^7.9.0", | ||
29 | + "chalk": "^2.0.0", | ||
30 | + "js-tokens": "^4.0.0" | ||
31 | + } | ||
32 | + }, | ||
33 | + "@polka/url": { | ||
34 | + "version": "0.5.0", | ||
35 | + "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", | ||
36 | + "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" | ||
37 | + }, | ||
38 | + "@rollup/plugin-commonjs": { | ||
39 | + "version": "11.0.2", | ||
40 | + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz", | ||
41 | + "integrity": "sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g==", | ||
42 | + "dev": true, | ||
43 | + "requires": { | ||
44 | + "@rollup/pluginutils": "^3.0.0", | ||
45 | + "estree-walker": "^1.0.1", | ||
46 | + "is-reference": "^1.1.2", | ||
47 | + "magic-string": "^0.25.2", | ||
48 | + "resolve": "^1.11.0" | ||
49 | + } | ||
50 | + }, | ||
51 | + "@rollup/plugin-node-resolve": { | ||
52 | + "version": "7.1.3", | ||
53 | + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", | ||
54 | + "integrity": "sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==", | ||
55 | + "dev": true, | ||
56 | + "requires": { | ||
57 | + "@rollup/pluginutils": "^3.0.8", | ||
58 | + "@types/resolve": "0.0.8", | ||
59 | + "builtin-modules": "^3.1.0", | ||
60 | + "is-module": "^1.0.0", | ||
61 | + "resolve": "^1.14.2" | ||
62 | + } | ||
63 | + }, | ||
64 | + "@rollup/pluginutils": { | ||
65 | + "version": "3.0.10", | ||
66 | + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz", | ||
67 | + "integrity": "sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw==", | ||
68 | + "dev": true, | ||
69 | + "requires": { | ||
70 | + "@types/estree": "0.0.39", | ||
71 | + "estree-walker": "^1.0.1", | ||
72 | + "picomatch": "^2.2.2" | ||
73 | + } | ||
74 | + }, | ||
75 | + "@types/estree": { | ||
76 | + "version": "0.0.39", | ||
77 | + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", | ||
78 | + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", | ||
79 | + "dev": true | ||
80 | + }, | ||
81 | + "@types/node": { | ||
82 | + "version": "14.0.1", | ||
83 | + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.1.tgz", | ||
84 | + "integrity": "sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA==", | ||
85 | + "dev": true | ||
86 | + }, | ||
87 | + "@types/resolve": { | ||
88 | + "version": "0.0.8", | ||
89 | + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", | ||
90 | + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", | ||
91 | + "dev": true, | ||
92 | + "requires": { | ||
93 | + "@types/node": "*" | ||
94 | + } | ||
95 | + }, | ||
96 | + "acorn": { | ||
97 | + "version": "7.2.0", | ||
98 | + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", | ||
99 | + "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", | ||
100 | + "dev": true | ||
101 | + }, | ||
102 | + "ansi-styles": { | ||
103 | + "version": "3.2.1", | ||
104 | + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | ||
105 | + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | ||
106 | + "dev": true, | ||
107 | + "requires": { | ||
108 | + "color-convert": "^1.9.0" | ||
109 | + } | ||
110 | + }, | ||
111 | + "anymatch": { | ||
112 | + "version": "3.1.1", | ||
113 | + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", | ||
114 | + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", | ||
115 | + "dev": true, | ||
116 | + "requires": { | ||
117 | + "normalize-path": "^3.0.0", | ||
118 | + "picomatch": "^2.0.4" | ||
119 | + } | ||
120 | + }, | ||
121 | + "async-limiter": { | ||
122 | + "version": "1.0.1", | ||
123 | + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", | ||
124 | + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", | ||
125 | + "dev": true | ||
126 | + }, | ||
127 | + "binary-extensions": { | ||
128 | + "version": "2.0.0", | ||
129 | + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", | ||
130 | + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", | ||
131 | + "dev": true | ||
132 | + }, | ||
133 | + "braces": { | ||
134 | + "version": "3.0.2", | ||
135 | + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", | ||
136 | + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", | ||
137 | + "dev": true, | ||
138 | + "requires": { | ||
139 | + "fill-range": "^7.0.1" | ||
140 | + } | ||
141 | + }, | ||
142 | + "buffer-from": { | ||
143 | + "version": "1.1.1", | ||
144 | + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", | ||
145 | + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", | ||
146 | + "dev": true | ||
147 | + }, | ||
148 | + "builtin-modules": { | ||
149 | + "version": "3.1.0", | ||
150 | + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", | ||
151 | + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", | ||
152 | + "dev": true | ||
153 | + }, | ||
154 | + "chalk": { | ||
155 | + "version": "2.4.2", | ||
156 | + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", | ||
157 | + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", | ||
158 | + "dev": true, | ||
159 | + "requires": { | ||
160 | + "ansi-styles": "^3.2.1", | ||
161 | + "escape-string-regexp": "^1.0.5", | ||
162 | + "supports-color": "^5.3.0" | ||
163 | + } | ||
164 | + }, | ||
165 | + "chokidar": { | ||
166 | + "version": "3.4.0", | ||
167 | + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", | ||
168 | + "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", | ||
169 | + "dev": true, | ||
170 | + "requires": { | ||
171 | + "anymatch": "~3.1.1", | ||
172 | + "braces": "~3.0.2", | ||
173 | + "fsevents": "~2.1.2", | ||
174 | + "glob-parent": "~5.1.0", | ||
175 | + "is-binary-path": "~2.1.0", | ||
176 | + "is-glob": "~4.0.1", | ||
177 | + "normalize-path": "~3.0.0", | ||
178 | + "readdirp": "~3.4.0" | ||
179 | + } | ||
180 | + }, | ||
181 | + "color-convert": { | ||
182 | + "version": "1.9.3", | ||
183 | + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | ||
184 | + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | ||
185 | + "dev": true, | ||
186 | + "requires": { | ||
187 | + "color-name": "1.1.3" | ||
188 | + } | ||
189 | + }, | ||
190 | + "color-name": { | ||
191 | + "version": "1.1.3", | ||
192 | + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | ||
193 | + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | ||
194 | + "dev": true | ||
195 | + }, | ||
196 | + "commander": { | ||
197 | + "version": "2.20.3", | ||
198 | + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", | ||
199 | + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", | ||
200 | + "dev": true | ||
201 | + }, | ||
202 | + "console-clear": { | ||
203 | + "version": "1.1.1", | ||
204 | + "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", | ||
205 | + "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==" | ||
206 | + }, | ||
207 | + "escape-string-regexp": { | ||
208 | + "version": "1.0.5", | ||
209 | + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", | ||
210 | + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", | ||
211 | + "dev": true | ||
212 | + }, | ||
213 | + "estree-walker": { | ||
214 | + "version": "1.0.1", | ||
215 | + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", | ||
216 | + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", | ||
217 | + "dev": true | ||
218 | + }, | ||
219 | + "fill-range": { | ||
220 | + "version": "7.0.1", | ||
221 | + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", | ||
222 | + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", | ||
223 | + "dev": true, | ||
224 | + "requires": { | ||
225 | + "to-regex-range": "^5.0.1" | ||
226 | + } | ||
227 | + }, | ||
228 | + "fsevents": { | ||
229 | + "version": "2.1.3", | ||
230 | + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", | ||
231 | + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", | ||
232 | + "dev": true, | ||
233 | + "optional": true | ||
234 | + }, | ||
235 | + "get-port": { | ||
236 | + "version": "3.2.0", | ||
237 | + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", | ||
238 | + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" | ||
239 | + }, | ||
240 | + "glob-parent": { | ||
241 | + "version": "5.1.1", | ||
242 | + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", | ||
243 | + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", | ||
244 | + "dev": true, | ||
245 | + "requires": { | ||
246 | + "is-glob": "^4.0.1" | ||
247 | + } | ||
248 | + }, | ||
249 | + "has-flag": { | ||
250 | + "version": "3.0.0", | ||
251 | + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | ||
252 | + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", | ||
253 | + "dev": true | ||
254 | + }, | ||
255 | + "is-binary-path": { | ||
256 | + "version": "2.1.0", | ||
257 | + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", | ||
258 | + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", | ||
259 | + "dev": true, | ||
260 | + "requires": { | ||
261 | + "binary-extensions": "^2.0.0" | ||
262 | + } | ||
263 | + }, | ||
264 | + "is-extglob": { | ||
265 | + "version": "2.1.1", | ||
266 | + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", | ||
267 | + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", | ||
268 | + "dev": true | ||
269 | + }, | ||
270 | + "is-glob": { | ||
271 | + "version": "4.0.1", | ||
272 | + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", | ||
273 | + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", | ||
274 | + "dev": true, | ||
275 | + "requires": { | ||
276 | + "is-extglob": "^2.1.1" | ||
277 | + } | ||
278 | + }, | ||
279 | + "is-module": { | ||
280 | + "version": "1.0.0", | ||
281 | + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", | ||
282 | + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", | ||
283 | + "dev": true | ||
284 | + }, | ||
285 | + "is-number": { | ||
286 | + "version": "7.0.0", | ||
287 | + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", | ||
288 | + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", | ||
289 | + "dev": true | ||
290 | + }, | ||
291 | + "is-reference": { | ||
292 | + "version": "1.1.4", | ||
293 | + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", | ||
294 | + "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", | ||
295 | + "dev": true, | ||
296 | + "requires": { | ||
297 | + "@types/estree": "0.0.39" | ||
298 | + } | ||
299 | + }, | ||
300 | + "jest-worker": { | ||
301 | + "version": "24.9.0", | ||
302 | + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", | ||
303 | + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", | ||
304 | + "dev": true, | ||
305 | + "requires": { | ||
306 | + "merge-stream": "^2.0.0", | ||
307 | + "supports-color": "^6.1.0" | ||
308 | + }, | ||
309 | + "dependencies": { | ||
310 | + "supports-color": { | ||
311 | + "version": "6.1.0", | ||
312 | + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", | ||
313 | + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", | ||
314 | + "dev": true, | ||
315 | + "requires": { | ||
316 | + "has-flag": "^3.0.0" | ||
317 | + } | ||
318 | + } | ||
319 | + } | ||
320 | + }, | ||
321 | + "js-tokens": { | ||
322 | + "version": "4.0.0", | ||
323 | + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", | ||
324 | + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", | ||
325 | + "dev": true | ||
326 | + }, | ||
327 | + "kleur": { | ||
328 | + "version": "3.0.3", | ||
329 | + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", | ||
330 | + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==" | ||
331 | + }, | ||
332 | + "livereload": { | ||
333 | + "version": "0.9.1", | ||
334 | + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.1.tgz", | ||
335 | + "integrity": "sha512-9g7sua11kkyZNo2hLRCG3LuZZwqexoyEyecSlV8cAsfAVVCZqLzVir6XDqmH0r+Vzgnd5LrdHDMyjtFnJQLAYw==", | ||
336 | + "dev": true, | ||
337 | + "requires": { | ||
338 | + "chokidar": "^3.3.0", | ||
339 | + "livereload-js": "^3.1.0", | ||
340 | + "opts": ">= 1.2.0", | ||
341 | + "ws": "^6.2.1" | ||
342 | + } | ||
343 | + }, | ||
344 | + "livereload-js": { | ||
345 | + "version": "3.2.2", | ||
346 | + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.2.2.tgz", | ||
347 | + "integrity": "sha512-xhScbNeC687ZINjEf/bD+BMiPx4s4q0mehcLb3zCc8+mykOtmaBR4vqzyIV9rIGdG9JjHaT0LiFdscvivCjX1Q==", | ||
348 | + "dev": true | ||
349 | + }, | ||
350 | + "local-access": { | ||
351 | + "version": "1.0.1", | ||
352 | + "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.0.1.tgz", | ||
353 | + "integrity": "sha512-ykt2pgN0aqIy6KQC1CqdWTWkmUwNgaOS6dcpHVjyBJONA+Xi7AtSB1vuxC/U/0tjIP3wcRudwQk1YYzUvzk2bA==" | ||
354 | + }, | ||
355 | + "magic-string": { | ||
356 | + "version": "0.25.7", | ||
357 | + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", | ||
358 | + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", | ||
359 | + "dev": true, | ||
360 | + "requires": { | ||
361 | + "sourcemap-codec": "^1.4.4" | ||
362 | + } | ||
363 | + }, | ||
364 | + "merge-stream": { | ||
365 | + "version": "2.0.0", | ||
366 | + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", | ||
367 | + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", | ||
368 | + "dev": true | ||
369 | + }, | ||
370 | + "mime": { | ||
371 | + "version": "2.4.5", | ||
372 | + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz", | ||
373 | + "integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w==" | ||
374 | + }, | ||
375 | + "mri": { | ||
376 | + "version": "1.1.5", | ||
377 | + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", | ||
378 | + "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==" | ||
379 | + }, | ||
380 | + "normalize-path": { | ||
381 | + "version": "3.0.0", | ||
382 | + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||
383 | + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", | ||
384 | + "dev": true | ||
385 | + }, | ||
386 | + "opts": { | ||
387 | + "version": "1.2.7", | ||
388 | + "resolved": "https://registry.npmjs.org/opts/-/opts-1.2.7.tgz", | ||
389 | + "integrity": "sha512-hwZhzGGG/GQ7igxAVFOEun2N4fWul31qE9nfBdCnZGQCB5+L7tN9xZ+94B4aUpLOJx/of3zZs5XsuubayQYQjA==", | ||
390 | + "dev": true | ||
391 | + }, | ||
392 | + "path-parse": { | ||
393 | + "version": "1.0.6", | ||
394 | + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", | ||
395 | + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", | ||
396 | + "dev": true | ||
397 | + }, | ||
398 | + "picomatch": { | ||
399 | + "version": "2.2.2", | ||
400 | + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", | ||
401 | + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", | ||
402 | + "dev": true | ||
403 | + }, | ||
404 | + "readdirp": { | ||
405 | + "version": "3.4.0", | ||
406 | + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", | ||
407 | + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", | ||
408 | + "dev": true, | ||
409 | + "requires": { | ||
410 | + "picomatch": "^2.2.1" | ||
411 | + } | ||
412 | + }, | ||
413 | + "require-relative": { | ||
414 | + "version": "0.8.7", | ||
415 | + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", | ||
416 | + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", | ||
417 | + "dev": true | ||
418 | + }, | ||
419 | + "resolve": { | ||
420 | + "version": "1.17.0", | ||
421 | + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", | ||
422 | + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", | ||
423 | + "dev": true, | ||
424 | + "requires": { | ||
425 | + "path-parse": "^1.0.6" | ||
426 | + } | ||
427 | + }, | ||
428 | + "rollup": { | ||
429 | + "version": "1.32.1", | ||
430 | + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz", | ||
431 | + "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==", | ||
432 | + "dev": true, | ||
433 | + "requires": { | ||
434 | + "@types/estree": "*", | ||
435 | + "@types/node": "*", | ||
436 | + "acorn": "^7.1.0" | ||
437 | + } | ||
438 | + }, | ||
439 | + "rollup-plugin-livereload": { | ||
440 | + "version": "1.3.0", | ||
441 | + "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-1.3.0.tgz", | ||
442 | + "integrity": "sha512-abyqXaB21+nFHo+vJULBqfzNx6zXABC19UyvqgDfdoxR/8pFAd041GO+GIUe8ZYC2DbuMUmioh1Lvbk14YLZgw==", | ||
443 | + "dev": true, | ||
444 | + "requires": { | ||
445 | + "livereload": "^0.9.1" | ||
446 | + } | ||
447 | + }, | ||
448 | + "rollup-plugin-svelte": { | ||
449 | + "version": "5.2.2", | ||
450 | + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.2.2.tgz", | ||
451 | + "integrity": "sha512-I+TJ2T+VLKGbKQcpeMJ4AR2ciROqTZNjxbiMiH4Cn1yByaB9OEuy3CnrgHHuWatQcPuF3yIViyKX7OlETWDKOQ==", | ||
452 | + "dev": true, | ||
453 | + "requires": { | ||
454 | + "require-relative": "^0.8.7", | ||
455 | + "rollup-pluginutils": "^2.8.2", | ||
456 | + "sourcemap-codec": "^1.4.8" | ||
457 | + } | ||
458 | + }, | ||
459 | + "rollup-plugin-terser": { | ||
460 | + "version": "5.3.0", | ||
461 | + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz", | ||
462 | + "integrity": "sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==", | ||
463 | + "dev": true, | ||
464 | + "requires": { | ||
465 | + "@babel/code-frame": "^7.5.5", | ||
466 | + "jest-worker": "^24.9.0", | ||
467 | + "rollup-pluginutils": "^2.8.2", | ||
468 | + "serialize-javascript": "^2.1.2", | ||
469 | + "terser": "^4.6.2" | ||
470 | + } | ||
471 | + }, | ||
472 | + "rollup-pluginutils": { | ||
473 | + "version": "2.8.2", | ||
474 | + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", | ||
475 | + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", | ||
476 | + "dev": true, | ||
477 | + "requires": { | ||
478 | + "estree-walker": "^0.6.1" | ||
479 | + }, | ||
480 | + "dependencies": { | ||
481 | + "estree-walker": { | ||
482 | + "version": "0.6.1", | ||
483 | + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", | ||
484 | + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", | ||
485 | + "dev": true | ||
486 | + } | ||
487 | + } | ||
488 | + }, | ||
489 | + "sade": { | ||
490 | + "version": "1.7.3", | ||
491 | + "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.3.tgz", | ||
492 | + "integrity": "sha512-m4BctppMvJ60W1dXnHq7jMmFe3hPJZDAH85kQ3ACTo7XZNVUuTItCQ+2HfyaMeV5cKrbw7l4vD/6We3GBxvdJw==", | ||
493 | + "requires": { | ||
494 | + "mri": "^1.1.0" | ||
495 | + } | ||
496 | + }, | ||
497 | + "serialize-javascript": { | ||
498 | + "version": "2.1.2", | ||
499 | + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", | ||
500 | + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", | ||
501 | + "dev": true | ||
502 | + }, | ||
503 | + "sirv": { | ||
504 | + "version": "0.4.2", | ||
505 | + "resolved": "https://registry.npmjs.org/sirv/-/sirv-0.4.2.tgz", | ||
506 | + "integrity": "sha512-dQbZnsMaIiTQPZmbGmktz+c74zt/hyrJEB4tdp2Jj0RNv9J6B/OWR5RyrZEvIn9fyh9Zlg2OlE2XzKz6wMKGAw==", | ||
507 | + "requires": { | ||
508 | + "@polka/url": "^0.5.0", | ||
509 | + "mime": "^2.3.1" | ||
510 | + } | ||
511 | + }, | ||
512 | + "sirv-cli": { | ||
513 | + "version": "0.4.5", | ||
514 | + "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-0.4.5.tgz", | ||
515 | + "integrity": "sha512-Fl6icSm0EwPrXSGid2xphMp//WNTSX2yENRAGnJuuZNmdc8LvE/BtdZD3MPn28ifAfDqTMwbB3dpcZojAIOiBg==", | ||
516 | + "requires": { | ||
517 | + "console-clear": "^1.1.0", | ||
518 | + "get-port": "^3.2.0", | ||
519 | + "kleur": "^3.0.0", | ||
520 | + "local-access": "^1.0.1", | ||
521 | + "sade": "^1.4.0", | ||
522 | + "sirv": "^0.4.2", | ||
523 | + "tinydate": "^1.0.0" | ||
524 | + } | ||
525 | + }, | ||
526 | + "source-map": { | ||
527 | + "version": "0.6.1", | ||
528 | + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", | ||
529 | + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", | ||
530 | + "dev": true | ||
531 | + }, | ||
532 | + "source-map-support": { | ||
533 | + "version": "0.5.19", | ||
534 | + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", | ||
535 | + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", | ||
536 | + "dev": true, | ||
537 | + "requires": { | ||
538 | + "buffer-from": "^1.0.0", | ||
539 | + "source-map": "^0.6.0" | ||
540 | + } | ||
541 | + }, | ||
542 | + "sourcemap-codec": { | ||
543 | + "version": "1.4.8", | ||
544 | + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", | ||
545 | + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", | ||
546 | + "dev": true | ||
547 | + }, | ||
548 | + "supports-color": { | ||
549 | + "version": "5.5.0", | ||
550 | + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", | ||
551 | + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", | ||
552 | + "dev": true, | ||
553 | + "requires": { | ||
554 | + "has-flag": "^3.0.0" | ||
555 | + } | ||
556 | + }, | ||
557 | + "svelte": { | ||
558 | + "version": "3.22.3", | ||
559 | + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.22.3.tgz", | ||
560 | + "integrity": "sha512-DumSy5eWPFPlMUGf3+eHyFSkt5yLqyAmMdCuXOE4qc5GtFyLxwTAGKZmgKmW2jmbpTTeFQ/fSQfDBQbl9Eo7yw==", | ||
561 | + "dev": true | ||
562 | + }, | ||
563 | + "terser": { | ||
564 | + "version": "4.7.0", | ||
565 | + "resolved": "https://registry.npmjs.org/terser/-/terser-4.7.0.tgz", | ||
566 | + "integrity": "sha512-Lfb0RiZcjRDXCC3OSHJpEkxJ9Qeqs6mp2v4jf2MHfy8vGERmVDuvjXdd/EnP5Deme5F2yBRBymKmKHCBg2echw==", | ||
567 | + "dev": true, | ||
568 | + "requires": { | ||
569 | + "commander": "^2.20.0", | ||
570 | + "source-map": "~0.6.1", | ||
571 | + "source-map-support": "~0.5.12" | ||
572 | + } | ||
573 | + }, | ||
574 | + "tinydate": { | ||
575 | + "version": "1.2.0", | ||
576 | + "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.2.0.tgz", | ||
577 | + "integrity": "sha512-3GwPk8VhDFnUZ2TrgkhXJs6hcMAIIw4x/xkz+ayK6dGoQmp2nUwKzBXK0WnMsqkh6vfUhpqQicQF3rbshfyJkg==" | ||
578 | + }, | ||
579 | + "to-regex-range": { | ||
580 | + "version": "5.0.1", | ||
581 | + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", | ||
582 | + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", | ||
583 | + "dev": true, | ||
584 | + "requires": { | ||
585 | + "is-number": "^7.0.0" | ||
586 | + } | ||
587 | + }, | ||
588 | + "ws": { | ||
589 | + "version": "6.2.1", | ||
590 | + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", | ||
591 | + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", | ||
592 | + "dev": true, | ||
593 | + "requires": { | ||
594 | + "async-limiter": "~1.0.0" | ||
595 | + } | ||
596 | + } | ||
597 | + } | ||
598 | +} |
app/web/package.json
0 → 100644
1 | +{ | ||
2 | + "name": "svelte-app", | ||
3 | + "version": "1.0.0", | ||
4 | + "scripts": { | ||
5 | + "build": "rollup -c", | ||
6 | + "dev": "rollup -c -w", | ||
7 | + "start": "sirv public" | ||
8 | + }, | ||
9 | + "devDependencies": { | ||
10 | + "@rollup/plugin-commonjs": "11.0.2", | ||
11 | + "@rollup/plugin-node-resolve": "^7.0.0", | ||
12 | + "rollup": "^1.20.0", | ||
13 | + "rollup-plugin-livereload": "^1.0.0", | ||
14 | + "rollup-plugin-svelte": "^5.0.3", | ||
15 | + "rollup-plugin-terser": "^5.1.2", | ||
16 | + "svelte": "^3.0.0" | ||
17 | + }, | ||
18 | + "dependencies": { | ||
19 | + "sirv-cli": "^0.4.4" | ||
20 | + } | ||
21 | +} |
app/web/public/favicon.png
0 → 100644
3.05 KB
app/web/public/global.css
0 → 100644
1 | +html, body { | ||
2 | + position: relative; | ||
3 | + width: 100%; | ||
4 | + height: 100%; | ||
5 | +} | ||
6 | + | ||
7 | +body { | ||
8 | + color: #333; | ||
9 | + margin: 0; | ||
10 | + padding: 8px; | ||
11 | + box-sizing: border-box; | ||
12 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
13 | +} | ||
14 | + | ||
15 | +a { | ||
16 | + color: rgb(0,100,200); | ||
17 | + text-decoration: none; | ||
18 | +} | ||
19 | + | ||
20 | +a:hover { | ||
21 | + text-decoration: underline; | ||
22 | +} | ||
23 | + | ||
24 | +a:visited { | ||
25 | + color: rgb(0,80,160); | ||
26 | +} | ||
27 | + | ||
28 | +label { | ||
29 | + display: block; | ||
30 | +} | ||
31 | + | ||
32 | +input, button, select, textarea { | ||
33 | + font-family: inherit; | ||
34 | + font-size: inherit; | ||
35 | + padding: 0.4em; | ||
36 | + margin: 0 0 0.5em 0; | ||
37 | + box-sizing: border-box; | ||
38 | + border: 1px solid #ccc; | ||
39 | + border-radius: 2px; | ||
40 | +} | ||
41 | + | ||
42 | +input:disabled { | ||
43 | + color: #ccc; | ||
44 | +} | ||
45 | + | ||
46 | +input[type="range"] { | ||
47 | + height: 0; | ||
48 | +} | ||
49 | + | ||
50 | +button { | ||
51 | + color: #333; | ||
52 | + background-color: #f4f4f4; | ||
53 | + outline: none; | ||
54 | +} | ||
55 | + | ||
56 | +button:disabled { | ||
57 | + color: #999; | ||
58 | +} | ||
59 | + | ||
60 | +button:not(:disabled):active { | ||
61 | + background-color: #ddd; | ||
62 | +} | ||
63 | + | ||
64 | +button:focus { | ||
65 | + border-color: #666; | ||
66 | +} |
app/web/public/index.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | +<head> | ||
4 | + <meta charset='utf-8'> | ||
5 | + <meta name='viewport' content='width=device-width,initial-scale=1'> | ||
6 | + | ||
7 | + <title>Svelte app</title> | ||
8 | + | ||
9 | + <link rel='icon' type='image/png' href='/favicon.png'> | ||
10 | + <link rel='stylesheet' href='/global.css'> | ||
11 | + <link rel='stylesheet' href='/build/bundle.css'> | ||
12 | + | ||
13 | + <script defer src='/build/bundle.js'></script> | ||
14 | +</head> | ||
15 | + | ||
16 | +<body> | ||
17 | +</body> | ||
18 | +</html> |
app/web/rollup.config.js
0 → 100644
1 | +import svelte from 'rollup-plugin-svelte'; | ||
2 | +import resolve from '@rollup/plugin-node-resolve'; | ||
3 | +import commonjs from '@rollup/plugin-commonjs'; | ||
4 | +import livereload from 'rollup-plugin-livereload'; | ||
5 | +import { terser } from 'rollup-plugin-terser'; | ||
6 | + | ||
7 | +const production = !process.env.ROLLUP_WATCH; | ||
8 | + | ||
9 | +export default { | ||
10 | + input: 'src/main.js', | ||
11 | + output: { | ||
12 | + sourcemap: true, | ||
13 | + format: 'iife', | ||
14 | + name: 'app', | ||
15 | + file: 'public/build/bundle.js' | ||
16 | + }, | ||
17 | + plugins: [ | ||
18 | + svelte({ | ||
19 | + // enable run-time checks when not in production | ||
20 | + dev: !production, | ||
21 | + // we'll extract any component CSS out into | ||
22 | + // a separate file - better for performance | ||
23 | + css: css => { | ||
24 | + css.write('public/build/bundle.css'); | ||
25 | + } | ||
26 | + }), | ||
27 | + | ||
28 | + // If you have external dependencies installed from | ||
29 | + // npm, you'll most likely need these plugins. In | ||
30 | + // some cases you'll need additional configuration - | ||
31 | + // consult the documentation for details: | ||
32 | + // https://github.com/rollup/plugins/tree/master/packages/commonjs | ||
33 | + resolve({ | ||
34 | + browser: true, | ||
35 | + dedupe: ['svelte'] | ||
36 | + }), | ||
37 | + commonjs(), | ||
38 | + | ||
39 | + // In dev mode, call `npm run start` once | ||
40 | + // the bundle has been generated | ||
41 | + !production && serve(), | ||
42 | + | ||
43 | + // Watch the `public` directory and refresh the | ||
44 | + // browser on changes when not in production | ||
45 | + !production && livereload('public'), | ||
46 | + | ||
47 | + // If we're building for production (npm run build | ||
48 | + // instead of npm run dev), minify | ||
49 | + production && terser() | ||
50 | + ], | ||
51 | + watch: { | ||
52 | + clearScreen: false | ||
53 | + } | ||
54 | +}; | ||
55 | + | ||
56 | +function serve() { | ||
57 | + let started = false; | ||
58 | + | ||
59 | + return { | ||
60 | + writeBundle() { | ||
61 | + if (!started) { | ||
62 | + started = true; | ||
63 | + | ||
64 | + require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], { | ||
65 | + stdio: ['ignore', 'inherit', 'inherit'], | ||
66 | + shell: true | ||
67 | + }); | ||
68 | + } | ||
69 | + } | ||
70 | + }; | ||
71 | +} |
app/web/src/App.svelte
0 → 100644
1 | +<script> | ||
2 | + export let name; | ||
3 | +</script> | ||
4 | + | ||
5 | +<main> | ||
6 | + <h1>Hello {name}!</h1> | ||
7 | + <p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p> | ||
8 | +</main> | ||
9 | + | ||
10 | +<style> | ||
11 | + main { | ||
12 | + text-align: center; | ||
13 | + padding: 1em; | ||
14 | + max-width: 240px; | ||
15 | + margin: 0 auto; | ||
16 | + } | ||
17 | + | ||
18 | + h1 { | ||
19 | + color: #ff3e00; | ||
20 | + text-transform: uppercase; | ||
21 | + font-size: 4em; | ||
22 | + font-weight: 100; | ||
23 | + } | ||
24 | + | ||
25 | + @media (min-width: 640px) { | ||
26 | + main { | ||
27 | + max-width: none; | ||
28 | + } | ||
29 | + } | ||
30 | +</style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment