Commit 9ffbf4c5 authored by Aral Balkan's avatar Aral Balkan
Browse files

Revert to using plain snowpack + svelte

parent b86b2071
<script>
import Navigation from './Navigation.interface'
import HomeSection from './sections/Home.interface'
import AboutSection from './sections/About.interface'
import SlidingSection from './sections/Sliding.interface'
import SwitchSection from './sections/Switch.interface'
import PrivateSection from './sections/Private.interface'
import SignInSection from './sections/SignIn.interface'
import SignOutSection from './sections/SignOut.interface'
import NotFound from './sections/NotFound.interface'
import Navigation from './Navigation.svelte'
import HomeSection from './sections/Home.svelte'
import AboutSection from './sections/About.svelte'
import SlidingSection from './sections/Sliding.svelte'
import SwitchSection from './sections/Switch.svelte'
import PrivateSection from './sections/Private.svelte'
import SignInSection from './sections/SignIn.svelte'
import SignOutSection from './sections/SignOut.svelte'
import NotFound from './sections/NotFound.svelte'
import { initialise } from './state.js'
initialise()
......
import './index.css'
import Index from './Index.interface'
import Index from './Index.svelte'
new Index({
target: document.getElementById('svelte')
......
......@@ -4,6 +4,34 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@snowpack/plugin-svelte": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/@snowpack/plugin-svelte/-/plugin-svelte-3.5.2.tgz",
"integrity": "sha512-i7OhkIRNt1uJ/y3qpowlU7icjtSgFPIl/GjMmBxhtwoIqHAnowFLh1Ur5G6S36GCFo65ymClnYfEIM/2x1+wPQ==",
"requires": {
"rollup-plugin-svelte": "^7.0.0",
"svelte-hmr": "^0.12.1",
"svelte-preprocess": "^4.6.0"
}
},
"@types/node": {
"version": "14.14.28",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.28.tgz",
"integrity": "sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g=="
},
"@types/pug": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.4.tgz",
"integrity": "sha1-h3L80EGOPNLMFxVV1zAHQVBR9LI="
},
"@types/sass": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.16.0.tgz",
"integrity": "sha512-2XZovu4NwcqmtZtsBR5XYLw18T8cBCnU2USFHTnYLLHz9fkhnoEMoDsqShJIOFsFhn5aJHjweiUUdTrDGujegA==",
"requires": {
"@types/node": "*"
}
},
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
......@@ -33,16 +61,54 @@
"ieee754": "^1.1.13"
}
},
"detect-indent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.0.0.tgz",
"integrity": "sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA=="
},
"esbuild": {
"version": "0.8.46",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.46.tgz",
"integrity": "sha512-xck9sXNCNmjDHCCfxTCyhKTiFuEBweh+IDAhMLOJI990v1Fzii6MyIkT1LbkvjgoVgPX2SK1kpi5eZVGNrl8yg==",
"dev": true
},
"estree-walker": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
"integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w=="
},
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"optional": true
},
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"is-docker": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz",
"integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==",
"dev": true
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"is-wsl": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
"dev": true,
"requires": {
"is-docker": "^2.0.0"
}
},
"libsodium": {
"version": "0.7.8",
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.8.tgz",
......@@ -56,6 +122,21 @@
"libsodium": "0.7.8"
}
},
"min-indent": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
"integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="
},
"open": {
"version": "7.4.2",
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
"dev": true,
"requires": {
"is-docker": "^2.0.0",
"is-wsl": "^2.1.1"
}
},
"poly1305-js": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/poly1305-js/-/poly1305-js-0.4.3.tgz",
......@@ -64,6 +145,37 @@
"big-integer": "^1.6.48"
}
},
"require-relative": {
"version": "0.8.7",
"resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz",
"integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4="
},
"rollup": {
"version": "2.39.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.39.0.tgz",
"integrity": "sha512-+WR3bttcq7zE+BntH09UxaW3bQo3vItuYeLsyk4dL2tuwbeSKJuvwiawyhEnvRdRgrII0Uzk00FpctHO/zB1kw==",
"dev": true,
"requires": {
"fsevents": "~2.3.1"
}
},
"rollup-plugin-svelte": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-7.1.0.tgz",
"integrity": "sha512-vopCUq3G+25sKjwF5VilIbiY6KCuMNHP1PFvx2Vr3REBNMDllKHFZN2B9jwwC+MqNc3UPKkjXnceLPEjTjXGXg==",
"requires": {
"require-relative": "^0.8.7",
"rollup-pluginutils": "^2.8.2"
}
},
"rollup-pluginutils": {
"version": "2.8.2",
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
"integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
"requires": {
"estree-walker": "^0.6.1"
}
},
"scrypt-async": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/scrypt-async/-/scrypt-async-1.3.1.tgz",
......@@ -87,6 +199,18 @@
}
}
},
"snowpack": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.0.11.tgz",
"integrity": "sha512-lBxgkvWTgdg0szE31JUt01wQkA9Lnmm+6lxqeV9rxDfflpx7ASnldVHFvu7Se70QJmPTQB0UJjfKI+xmYGwiiQ==",
"dev": true,
"requires": {
"esbuild": "^0.8.7",
"fsevents": "^2.2.0",
"open": "^7.0.4",
"rollup": "^2.34.0"
}
},
"sodium-plus": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/sodium-plus/-/sodium-plus-0.9.0.tgz",
......@@ -99,16 +223,44 @@
"xsalsa20": "^1.1.0"
}
},
"strip-indent": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
"integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
"requires": {
"min-indent": "^1.0.0"
}
},
"svelte": {
"version": "3.32.3",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.32.3.tgz",
"integrity": "sha512-5etu/wDwtewhnYO/631KKTjSmFrKohFLWNm1sWErVHXqGZ8eJLqrW0qivDSyYTcN8GbUqsR4LkIhftNFsjNehg=="
},
"svelte-hmr": {
"version": "0.12.6",
"resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.12.6.tgz",
"integrity": "sha512-q08BjoUSbwXpKo9ij6aym93jBrt7K8eutLwix5Y9cuSFLS5djxumOoUVsSzDkdKssLlg5X//Kg/0MWHHBeQRTg=="
},
"svelte-loading-spinners": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/svelte-loading-spinners/-/svelte-loading-spinners-0.1.4.tgz",
"integrity": "sha512-r/0Hs9cxtRLh2RwBwwEat1V1M1kypaGFPllM7XdZSH299JTed994B6zMHJ1Z5Ug8B9Tl2bs+VOy8Vz5EFWy5Ww=="
},
"svelte-preprocess": {
"version": "4.6.9",
"resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.6.9.tgz",
"integrity": "sha512-SROWH0rB0DJ+0Ii264cprmNu/NJyZacs5wFD71ya93Cg/oA2lKHgQm4F6j0EWA4ktFMzeuJJm/eX6fka39hEHA==",
"requires": {
"@types/pug": "^2.0.4",
"@types/sass": "^1.16.0",
"detect-indent": "^6.0.0",
"strip-indent": "^3.0.0"
}
},
"svelte-switch": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/svelte-switch/-/svelte-switch-0.0.4.tgz",
"integrity": "sha512-Qb/S1CmO6XIaHbwwis5v1aJygna8DvKbnaiCpIUlDdIvZz35s6xQNnb88F2TtEsMUqmlGSm7DQYYBLIj3HwizA==",
"dev": true
"integrity": "sha512-Qb/S1CmO6XIaHbwwis5v1aJygna8DvKbnaiCpIUlDdIvZz35s6xQNnb88F2TtEsMUqmlGSm7DQYYBLIj3HwizA=="
},
"tweetnacl": {
"version": "1.0.3",
......
......@@ -11,15 +11,19 @@
"author": "",
"license": "ISC",
"dependencies": {
"@snowpack/plugin-svelte": "^3.5.2",
"blakejs": "^1.1.0",
"session25519": "^1.1.0",
"sodium-plus": "^0.9.0",
"svelte": "^3.32.3",
"svelte-hmr": "^0.12.6",
"svelte-loading-spinners": "^0.1.4",
"svelte-switch": "0.0.4",
"tweetnacl": "^1.0.3",
"tweetnacl-sealedbox-js": "^1.2.0",
"tweetnacl-util": "^0.15.1"
},
"devDependencies": {
"svelte-switch": "0.0.4"
"snowpack": "^3.0.11"
}
}
<script>
import Section from './Section.interface'
import Section from './Section.svelte'
</script>
<Section path='/about' title='About'>
......
<script>
import Section from './Section.interface'
import Section from './Section.svelte'
</script>
<Section path='/' title='Home'>
......
<script>
import Section from './Section.interface'
import Section from './Section.svelte'
let requestedSection = location.hash.replace('#', '')
......
<script>
import Section from './Section.interface'
import Section from './Section.svelte'
import { getContext } from 'svelte'
import { get } from 'svelte/store'
......
<script>
import { getContext } from 'svelte'
import { state } from '../state.js'
import Section from './Section.interface'
import Section from './Section.svelte'
import { authenticate } from '../authentication.js'
import { BarLoader } from 'svelte-loading-spinners'
......
<script>
import { getContext, tick } from 'svelte'
import { state } from '../state.js'
import Section from './Section.interface'
import Section from './Section.svelte'
let { signedIn, privatePath, currentSection } = getContext(state)
......
<script>
import Section from './Section.interface'
import Section from './Section.svelte'
import { slide } from 'svelte/transition'
let show = true
......
<script>
// @hmr:reset
import Section from './Section.interface'
import Section from './Section.svelte'
import Switch from 'svelte-switch'
let checkedValue = true;
......
// import process from 'process'
// import path from 'path'
// const __dirname = new URL('.', import.meta.url).pathname
/** @type {import("snowpack").SnowpackUserConfig } */
module.exports = {
mount: {
/* ... */
},
exclude: ['.git/**'],
plugins: [
['@snowpack/plugin-svelte'],
],
packageOptions: {
// resolvePaths: [__dirname],
// polyfillNode: true
},
devOptions: {
// output: 'stream', // Don’t clear terminal.
open: 'none',
secure: true,
port: 444,
},
buildOptions: {
/* ... */
},
optimize: {
bundle: true,
minify: true,
target: 'es2020',
},
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment