From f331da02a0bc3cc5d3f9a6ece466db5531e316ef Mon Sep 17 00:00:00 2001 From: ana Date: Sun, 8 Aug 2021 13:51:05 +0200 Subject: feat: initial svelte setup --- .gitignore | 3 +- index.css | 4 -- index.html | 14 ------- index.js | 2 - package-lock.json | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 7 ++++ public/index.css | 4 ++ public/index.html | 14 +++++++ snowpack.config.mjs | 7 ++-- src/App.svelte | 7 ++++ src/index.js | 7 ++++ 11 files changed, 152 insertions(+), 25 deletions(-) delete mode 100644 index.css delete mode 100644 index.html delete mode 100644 index.js create mode 100644 public/index.css create mode 100644 public/index.html create mode 100644 src/App.svelte create mode 100644 src/index.js diff --git a/.gitignore b/.gitignore index 97e3960..8e5ee43 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .snowpack build -node_modules \ No newline at end of file +node_modules +public/pure.css diff --git a/index.css b/index.css deleted file mode 100644 index 2f5d6f1..0000000 --- a/index.css +++ /dev/null @@ -1,4 +0,0 @@ -/* Add CSS styles here! */ -body { - font-family: sans-serif; -} diff --git a/index.html b/index.html deleted file mode 100644 index be57d3f..0000000 --- a/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - Starter Snowpack App - - -

Welcome to Snowpack!

- - - diff --git a/index.js b/index.js deleted file mode 100644 index 496a9c0..0000000 --- a/index.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Add JavaScript code here! */ -console.log('Hello World! You did it! Welcome to Snowpack :D'); diff --git a/package-lock.json b/package-lock.json index 0f27887..e382f58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -262,6 +262,17 @@ "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==", "dev": true }, + "@snowpack/plugin-svelte": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@snowpack/plugin-svelte/-/plugin-svelte-3.7.0.tgz", + "integrity": "sha512-YR2t/aMswjUV0D/qFBjIGA7VIgl5IrNHIuJbNtj2YR2heRWaSm7LYLUJKbnho7iKUqCtc+ZcwpgGZO/VNYlLNg==", + "dev": true, + "requires": { + "rollup-plugin-svelte": "^7.0.0", + "svelte-hmr": "^0.13.2", + "svelte-preprocess": "^4.7.2" + } + }, "@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -322,6 +333,12 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "@types/pug": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.5.tgz", + "integrity": "sha512-LOnASQoeNZMkzexRuyqcBBDZ6rS+rQxUMkmj5A0PkhhiSZivLIuz6Hxyr1mkGoEZEkk66faROmpMi4fFkrKsBA==", + "dev": true + }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -340,6 +357,15 @@ "@types/node": "*" } }, + "@types/sass": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.16.1.tgz", + "integrity": "sha512-iZUcRrGuz/Tbg3loODpW7vrQJkUtpY2fFSf4ELqqkApcS2TkZ1msk7ie8iZPB86lDOP8QOTTmuvWjc5S0R9OjQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -970,6 +996,12 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, + "detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true + }, "detect-port": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", @@ -2029,6 +2061,12 @@ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true }, + "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==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2714,6 +2752,11 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "purecss": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/purecss/-/purecss-2.0.6.tgz", + "integrity": "sha512-R5V/Yk/j8/v5ivlg0MvQKQmo7F1BnWupK0wiMrKDyz2BofLB5BFKfZtSqu90YwHYBH4uzLtebmnDltY3ElcyLw==" + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -2806,6 +2849,12 @@ "uuid": "^3.3.2" } }, + "require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", + "dev": true + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -2879,6 +2928,33 @@ "@rollup/plugin-inject": "^4.0.0" } }, + "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==", + "dev": true, + "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==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + } + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -3149,6 +3225,15 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "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==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -3158,6 +3243,29 @@ "has-flag": "^3.0.0" } }, + "svelte": { + "version": "3.42.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.42.1.tgz", + "integrity": "sha512-XtExLd2JAU3T7M2g/DkO3UNj/3n1WdTXrfL63OZ5nZq7nAqd9wQw+lR4Pv/wkVbrWbAIPfLDX47UjFdmnY+YtQ==" + }, + "svelte-hmr": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.13.5.tgz", + "integrity": "sha512-DgYkBMBkOFVqm0HydwKDLF9kZ3iJkNFZeR9TjkTytcActs3onfd3qXP/ImqKd492PRLQbNtW1V/AeYN1R2IxOw==", + "dev": true + }, + "svelte-preprocess": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.7.4.tgz", + "integrity": "sha512-mDAmaltQl6e5zU2VEtoWEf7eLTfuOTGr9zt+BpA3AGHo8MIhKiNSPE9OLTCTOMgj0vj/uL9QBbaNmpG4G1CgIA==", + "dev": true, + "requires": { + "@types/pug": "^2.0.4", + "@types/sass": "^1.16.0", + "detect-indent": "^6.0.0", + "strip-indent": "^3.0.0" + } + }, "tar": { "version": "6.1.6", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.6.tgz", diff --git a/package.json b/package.json index 51c6150..dead576 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,17 @@ { "scripts": { + "prestart": "cp node_modules/purecss/build/pure-min.css public/pure.css", + "prebuild": "npm run prestart", "start": "snowpack dev", "build": "snowpack build", "test": "echo \"This template does not include a test runner by default.\" && exit 1" }, "devDependencies": { + "@snowpack/plugin-svelte": "^3.7.0", "snowpack": "^3.3.7" + }, + "dependencies": { + "purecss": "^2.0.6", + "svelte": "^3.42.1" } } diff --git a/public/index.css b/public/index.css new file mode 100644 index 0000000..2f5d6f1 --- /dev/null +++ b/public/index.css @@ -0,0 +1,4 @@ +/* Add CSS styles here! */ +body { + font-family: sans-serif; +} diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..08635e2 --- /dev/null +++ b/public/index.html @@ -0,0 +1,14 @@ + + + + + + + + + FFXIV Eureka Marks + + + + + diff --git a/snowpack.config.mjs b/snowpack.config.mjs index f4340c6..d09dc13 100644 --- a/snowpack.config.mjs +++ b/snowpack.config.mjs @@ -1,11 +1,10 @@ /** @type {import("snowpack").SnowpackUserConfig } */ export default { mount: { - /* ... */ + public: "/", + src: "/dist", }, - plugins: [ - /* ... */ - ], + plugins: ["@snowpack/plugin-svelte"], routes: [ /* Enable an SPA Fallback in development: */ // {"match": "routes", "src": ".*", "dest": "/index.html"}, diff --git a/src/App.svelte b/src/App.svelte new file mode 100644 index 0000000..a273fcc --- /dev/null +++ b/src/App.svelte @@ -0,0 +1,7 @@ + + +
+

Level:

+
+ + diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..1da4f5c --- /dev/null +++ b/src/index.js @@ -0,0 +1,7 @@ +import App from "./App.svelte"; + +let app = new App({ + target: document.body, +}); + +export default App; -- cgit 1.4.1-2-gfad0