diff --git a/.gitignore b/.gitignore index b8901d0..97e9358 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ node_modules vite.config.js.timestamp-* vite.config.ts.timestamp-* pnpm-lock.yaml +.npmrc diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 0000000..4bcceb1 --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,15 @@ +# https://taskfile.dev + +version: '3' + +vars: + GREETING: Hello, World! + +tasks: + build: vite build + dev: vite + test: vitest src + default: + cmds: + - echo "{{.GREETING}}" + silent: true diff --git a/index.html b/index.html new file mode 100644 index 0000000..29b7dbd --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ + + + + + + + Vite + Svelte + + + +
+ + + diff --git a/package.json b/package.json index 79f1af8..a00c717 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,18 @@ }, "type": "module", "dependencies": { + "@ernane/svelte-star-rating": "^1.1.2", + "@sveltejs/vite-plugin-svelte": "^2.0.2", + "@yanick/updeep-remeda": "^2.0.0", "beercss": "^3.0.4", "dexie": "^3.2.2", + "events": "^3.3.0", "fake-indexeddb": "^4.0.1", "material-dynamic-colors": "^0.1.5", - "remeda": "^1.3.0" + "pouchdb": "^8.0.0", + "pouchdb-adapter-memory": "^8.0.0", + "pouchdb-browser": "^8.0.0", + "remeda": "^1.3.0", + "svelte-spa-router": "^3.3.0" } } diff --git a/src/lib/components/App.svelte b/src/lib/components/App.svelte new file mode 100644 index 0000000..0b630f0 --- /dev/null +++ b/src/lib/components/App.svelte @@ -0,0 +1,32 @@ + +
+ +
+ + + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..7676196 --- /dev/null +++ b/src/main.js @@ -0,0 +1,8 @@ +//import './app.css' +import App from './lib/components/App.svelte'; + +const app = new App({ + target: document.getElementById('app'), +}); + +export default app; diff --git a/svelte.config.js b/svelte.config.js index 301e785..f6881d7 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -2,9 +2,9 @@ import adapter from '@sveltejs/adapter-auto'; /** @type {import('@sveltejs/kit').Config} */ const config = { - kit: { - adapter: adapter() - } + kit: { + adapter: adapter(), + }, }; export default config; diff --git a/vite.config.js b/vite.config.js index 652979f..5f67dfe 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,11 +1,20 @@ import { sveltekit } from '@sveltejs/kit/vite'; +import { svelte } from '@sveltejs/vite-plugin-svelte'; +console.log(import.meta); /** @type {import('vite').UserConfig} */ const config = { - plugins: [sveltekit()], - test: { - include: ['src/**/*.{test,spec}.{js,ts}'] - } + plugins: [svelte()], + test: { + include: ['src/**/*.{test,spec}.{js,ts}'], + }, + resolve: { + alias: { + $lib: + import.meta.url.replace('file://', '').replace(/[^/]+$/, '') + + 'src/lib', + }, + }, }; export default config;