├── .gitignore
├── .gitpod.yml
├── .vscode
└── extensions.json
├── README.md
├── index.html
├── jsconfig.json
├── package-lock.json
├── package.json
├── src
├── App.svelte
├── main.js
└── vite-env.d.ts
├── svelte.config.js
└── vite.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .idea
17 | .DS_Store
18 | *.suo
19 | *.ntvs*
20 | *.njsproj
21 | *.sln
22 | *.sw?
--------------------------------------------------------------------------------
/.gitpod.yml:
--------------------------------------------------------------------------------
1 | ports:
2 | - port: 5173
3 | onOpen: open-preview
4 |
5 | tasks:
6 | - name: Install Dependencies and Start Dev Server
7 | init: npm install
8 | command: npm run dev
9 |
10 | vscode:
11 | extensions:
12 | - svelte.svelte-vscode
13 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["svelte.svelte-vscode"]
3 | }
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ARCHIVED
2 |
3 | Please use [**gitpod-samples/template-sveltekit**](https://github.com/gitpod-samples/template-sveltekit) for the latest changes. Also, check out [**Svelte docs for Gitpod**](www.gitpod.io/docs/introduction/languages/svelte).
4 |
5 | ## A Svelte template on Gitpod
6 |
7 |
8 | This is a [Svelte](https://svelte.dev) template configured for ephemeral cloud development environments on [Gitpod](https://www.gitpod.io/).
9 |
10 | ## SvelteKit
11 |
12 | If you are looking for a SvelteKit example, please use [template-sveltekit](https://github.com/gitpod-io/template-sveltekit).
13 |
14 | ## Next Steps
15 |
16 | Click the button below to start a new development environment:
17 |
18 | [](https://gitpod.io/#https://github.com/gitpod-io/template-sveltejs)
19 |
20 | ## Get Started With Your Own Project
21 |
22 | ### A new project
23 |
24 | Click the above "Open in Gitpod" button to start a new workspace. Once you're ready to push your first code changes, Gitpod will guide you to fork this project so you own it.
25 |
26 | ### An existing project
27 |
28 | To get started with Svelte on Gitpod, add a [`.gitpod.yml`](./.gitpod.yml) file which contains the configuration to improve the developer experience on Gitpod. To learn more, please see the [Getting Started](https://www.gitpod.io/docs/getting-started) documentation.
29 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Svelte App
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "moduleResolution": "Node",
4 | "target": "ESNext",
5 | "module": "ESNext",
6 | /**
7 | * svelte-preprocess cannot figure out whether you have
8 | * a value or a type, so tell TypeScript to enforce using
9 | * `import type` instead of `import` for Types.
10 | */
11 | "importsNotUsedAsValues": "error",
12 | "isolatedModules": true,
13 | "resolveJsonModule": true,
14 | /**
15 | * To have warnings / errors of the Svelte compiler at the
16 | * correct position, enable source maps by default.
17 | */
18 | "sourceMap": true,
19 | "esModuleInterop": true,
20 | "skipLibCheck": true,
21 | "forceConsistentCasingInFileNames": true,
22 | /**
23 | * Typecheck JS in `.svelte` and `.js` files by default.
24 | * Disable this if you'd like to use dynamic types.
25 | */
26 | "checkJs": true
27 | },
28 | /**
29 | * Use global.d.ts instead of compilerOptions.types
30 | * to avoid limiting type declarations.
31 | */
32 | "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
33 | }
34 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelte-app",
3 | "version": "1.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "svelte-app",
9 | "version": "1.0.0",
10 | "devDependencies": {
11 | "@sveltejs/vite-plugin-svelte": "^2.0.3",
12 | "svelte": "^3.56.0",
13 | "vite": "^4.1.4"
14 | }
15 | },
16 | "node_modules/@esbuild/linux-x64": {
17 | "version": "0.16.17",
18 | "cpu": [
19 | "x64"
20 | ],
21 | "dev": true,
22 | "license": "MIT",
23 | "optional": true,
24 | "os": [
25 | "linux"
26 | ],
27 | "engines": {
28 | "node": ">=12"
29 | }
30 | },
31 | "node_modules/@jridgewell/sourcemap-codec": {
32 | "version": "1.4.14",
33 | "dev": true,
34 | "license": "MIT"
35 | },
36 | "node_modules/@sveltejs/vite-plugin-svelte": {
37 | "version": "2.0.3",
38 | "dev": true,
39 | "license": "MIT",
40 | "dependencies": {
41 | "debug": "^4.3.4",
42 | "deepmerge": "^4.3.0",
43 | "kleur": "^4.1.5",
44 | "magic-string": "^0.29.0",
45 | "svelte-hmr": "^0.15.1",
46 | "vitefu": "^0.2.4"
47 | },
48 | "engines": {
49 | "node": "^14.18.0 || >= 16"
50 | },
51 | "peerDependencies": {
52 | "svelte": "^3.54.0",
53 | "vite": "^4.0.0"
54 | }
55 | },
56 | "node_modules/debug": {
57 | "version": "4.3.4",
58 | "dev": true,
59 | "license": "MIT",
60 | "dependencies": {
61 | "ms": "2.1.2"
62 | },
63 | "engines": {
64 | "node": ">=6.0"
65 | },
66 | "peerDependenciesMeta": {
67 | "supports-color": {
68 | "optional": true
69 | }
70 | }
71 | },
72 | "node_modules/deepmerge": {
73 | "version": "4.3.0",
74 | "dev": true,
75 | "license": "MIT",
76 | "engines": {
77 | "node": ">=0.10.0"
78 | }
79 | },
80 | "node_modules/esbuild": {
81 | "version": "0.16.17",
82 | "dev": true,
83 | "hasInstallScript": true,
84 | "license": "MIT",
85 | "bin": {
86 | "esbuild": "bin/esbuild"
87 | },
88 | "engines": {
89 | "node": ">=12"
90 | },
91 | "optionalDependencies": {
92 | "@esbuild/android-arm": "0.16.17",
93 | "@esbuild/android-arm64": "0.16.17",
94 | "@esbuild/android-x64": "0.16.17",
95 | "@esbuild/darwin-arm64": "0.16.17",
96 | "@esbuild/darwin-x64": "0.16.17",
97 | "@esbuild/freebsd-arm64": "0.16.17",
98 | "@esbuild/freebsd-x64": "0.16.17",
99 | "@esbuild/linux-arm": "0.16.17",
100 | "@esbuild/linux-arm64": "0.16.17",
101 | "@esbuild/linux-ia32": "0.16.17",
102 | "@esbuild/linux-loong64": "0.16.17",
103 | "@esbuild/linux-mips64el": "0.16.17",
104 | "@esbuild/linux-ppc64": "0.16.17",
105 | "@esbuild/linux-riscv64": "0.16.17",
106 | "@esbuild/linux-s390x": "0.16.17",
107 | "@esbuild/linux-x64": "0.16.17",
108 | "@esbuild/netbsd-x64": "0.16.17",
109 | "@esbuild/openbsd-x64": "0.16.17",
110 | "@esbuild/sunos-x64": "0.16.17",
111 | "@esbuild/win32-arm64": "0.16.17",
112 | "@esbuild/win32-ia32": "0.16.17",
113 | "@esbuild/win32-x64": "0.16.17"
114 | }
115 | },
116 | "node_modules/function-bind": {
117 | "version": "1.1.1",
118 | "dev": true,
119 | "license": "MIT"
120 | },
121 | "node_modules/has": {
122 | "version": "1.0.3",
123 | "dev": true,
124 | "license": "MIT",
125 | "dependencies": {
126 | "function-bind": "^1.1.1"
127 | },
128 | "engines": {
129 | "node": ">= 0.4.0"
130 | }
131 | },
132 | "node_modules/is-core-module": {
133 | "version": "2.11.0",
134 | "dev": true,
135 | "license": "MIT",
136 | "dependencies": {
137 | "has": "^1.0.3"
138 | },
139 | "funding": {
140 | "url": "https://github.com/sponsors/ljharb"
141 | }
142 | },
143 | "node_modules/kleur": {
144 | "version": "4.1.5",
145 | "dev": true,
146 | "license": "MIT",
147 | "engines": {
148 | "node": ">=6"
149 | }
150 | },
151 | "node_modules/magic-string": {
152 | "version": "0.29.0",
153 | "dev": true,
154 | "license": "MIT",
155 | "dependencies": {
156 | "@jridgewell/sourcemap-codec": "^1.4.13"
157 | },
158 | "engines": {
159 | "node": ">=12"
160 | }
161 | },
162 | "node_modules/ms": {
163 | "version": "2.1.2",
164 | "dev": true,
165 | "license": "MIT"
166 | },
167 | "node_modules/nanoid": {
168 | "version": "3.3.4",
169 | "dev": true,
170 | "license": "MIT",
171 | "bin": {
172 | "nanoid": "bin/nanoid.cjs"
173 | },
174 | "engines": {
175 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
176 | }
177 | },
178 | "node_modules/path-parse": {
179 | "version": "1.0.7",
180 | "dev": true,
181 | "license": "MIT"
182 | },
183 | "node_modules/picocolors": {
184 | "version": "1.0.0",
185 | "dev": true,
186 | "license": "ISC"
187 | },
188 | "node_modules/postcss": {
189 | "version": "8.4.21",
190 | "dev": true,
191 | "funding": [
192 | {
193 | "type": "opencollective",
194 | "url": "https://opencollective.com/postcss/"
195 | },
196 | {
197 | "type": "tidelift",
198 | "url": "https://tidelift.com/funding/github/npm/postcss"
199 | }
200 | ],
201 | "license": "MIT",
202 | "dependencies": {
203 | "nanoid": "^3.3.4",
204 | "picocolors": "^1.0.0",
205 | "source-map-js": "^1.0.2"
206 | },
207 | "engines": {
208 | "node": "^10 || ^12 || >=14"
209 | }
210 | },
211 | "node_modules/resolve": {
212 | "version": "1.22.1",
213 | "dev": true,
214 | "license": "MIT",
215 | "dependencies": {
216 | "is-core-module": "^2.9.0",
217 | "path-parse": "^1.0.7",
218 | "supports-preserve-symlinks-flag": "^1.0.0"
219 | },
220 | "bin": {
221 | "resolve": "bin/resolve"
222 | },
223 | "funding": {
224 | "url": "https://github.com/sponsors/ljharb"
225 | }
226 | },
227 | "node_modules/rollup": {
228 | "version": "3.19.1",
229 | "dev": true,
230 | "license": "MIT",
231 | "bin": {
232 | "rollup": "dist/bin/rollup"
233 | },
234 | "engines": {
235 | "node": ">=14.18.0",
236 | "npm": ">=8.0.0"
237 | },
238 | "optionalDependencies": {
239 | "fsevents": "~2.3.2"
240 | }
241 | },
242 | "node_modules/source-map-js": {
243 | "version": "1.0.2",
244 | "dev": true,
245 | "license": "BSD-3-Clause",
246 | "engines": {
247 | "node": ">=0.10.0"
248 | }
249 | },
250 | "node_modules/supports-preserve-symlinks-flag": {
251 | "version": "1.0.0",
252 | "dev": true,
253 | "license": "MIT",
254 | "engines": {
255 | "node": ">= 0.4"
256 | },
257 | "funding": {
258 | "url": "https://github.com/sponsors/ljharb"
259 | }
260 | },
261 | "node_modules/svelte": {
262 | "version": "3.56.0",
263 | "dev": true,
264 | "license": "MIT",
265 | "engines": {
266 | "node": ">= 8"
267 | }
268 | },
269 | "node_modules/svelte-hmr": {
270 | "version": "0.15.1",
271 | "dev": true,
272 | "license": "ISC",
273 | "engines": {
274 | "node": "^12.20 || ^14.13.1 || >= 16"
275 | },
276 | "peerDependencies": {
277 | "svelte": ">=3.19.0"
278 | }
279 | },
280 | "node_modules/vite": {
281 | "version": "4.1.4",
282 | "dev": true,
283 | "license": "MIT",
284 | "dependencies": {
285 | "esbuild": "^0.16.14",
286 | "postcss": "^8.4.21",
287 | "resolve": "^1.22.1",
288 | "rollup": "^3.10.0"
289 | },
290 | "bin": {
291 | "vite": "bin/vite.js"
292 | },
293 | "engines": {
294 | "node": "^14.18.0 || >=16.0.0"
295 | },
296 | "optionalDependencies": {
297 | "fsevents": "~2.3.2"
298 | },
299 | "peerDependencies": {
300 | "@types/node": ">= 14",
301 | "less": "*",
302 | "sass": "*",
303 | "stylus": "*",
304 | "sugarss": "*",
305 | "terser": "^5.4.0"
306 | },
307 | "peerDependenciesMeta": {
308 | "@types/node": {
309 | "optional": true
310 | },
311 | "less": {
312 | "optional": true
313 | },
314 | "sass": {
315 | "optional": true
316 | },
317 | "stylus": {
318 | "optional": true
319 | },
320 | "sugarss": {
321 | "optional": true
322 | },
323 | "terser": {
324 | "optional": true
325 | }
326 | }
327 | },
328 | "node_modules/vitefu": {
329 | "version": "0.2.4",
330 | "dev": true,
331 | "license": "MIT",
332 | "peerDependencies": {
333 | "vite": "^3.0.0 || ^4.0.0"
334 | },
335 | "peerDependenciesMeta": {
336 | "vite": {
337 | "optional": true
338 | }
339 | }
340 | }
341 | }
342 | }
343 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelte-app",
3 | "version": "1.0.0",
4 | "type": "module",
5 | "private": true,
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build",
9 | "preview": "vite preview"
10 | },
11 | "devDependencies": {
12 | "@sveltejs/vite-plugin-svelte": "^2.0.3",
13 | "svelte": "^3.56.0",
14 | "vite": "^4.1.4"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/App.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 | Hello {name}!
7 | Visit the Svelte tutorial to learn how to build Svelte apps.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import App from './App.svelte';
2 |
3 | const app = new App({
4 | target: document.body,
5 | props: {
6 | name: 'world'
7 | }
8 | });
9 |
10 | export default app;
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/svelte.config.js:
--------------------------------------------------------------------------------
1 | import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
2 |
3 | export default {
4 | // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
5 | // for more information about preprocessors
6 | preprocess: vitePreprocess(),
7 | }
8 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { svelte } from '@sveltejs/vite-plugin-svelte'
2 | import { defineConfig } from 'vite'
3 |
4 | export default defineConfig({
5 | plugins: [svelte()],
6 | })
--------------------------------------------------------------------------------