under construction
Diese Informationen wurden für die Entwicklung mit Svelte 4 zusammengestellt.
Da das Projekt inzwischen auf Svelte 5 umgestellt wurde, sind die Informationen u. U. teilweise nicht mehr aktuell.
Everything you need to build a Svelte project, powered by create-svelte
.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.
npm run test
npm install prisma --save-dev
npx prisma init --datasource-provider postgresql
Create an .env file in the root folder of your project, if it does not yet exist.
Add an DATABASE_URL variable and set it to a valid connection string, e.g.
DATABASE_URL="postgresql://xxxxx:yyyyy-little-credit-30716388.eu-central-1.aws.neon.tech/IsarAmper?sslmode=require"
npx prisma db pull
npx prisma db push
You may use this command to preserve migration history.
I wouldn't recommend it when you work with different target databases, e.g. using development environments, or push to local and remote database.
npx prisma migrate dev --name=..comment..
npx prisma generate
Good for remote database.
Would prefer pgadmin for local database.
npx prisma studio
This information may be outdated as it was performed with Svelte 4, but currently used version is Svelte 5.
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Add the following statements to svelte.config.js:
import { vitePreprocess } from '@sveltejs/kit/vite';
const config = {
...
preprocess: vitePreprocess()
};
Add the following statement to tailwind.config.js:
export default {
content: [
'./src/**/*.{html,js,svelte,ts}',
...
],
...
}
Add the following statements to app.css:
@tailwind base;
@tailwind components;
@tailwind utilities;
Add the following statement to your layout file:
import "../app.css";
npm install flowbite flowbite-svelte tailwind-merge @popperjs/core
Laden von
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
Dann Datenbank anlegen via
pgadmin
Dann Datenbank-Tabellen pushen via:
npx prisma db push
Um Daten von einer Datenbank in eine andere Datenbank zu bringen, z. B. von lokal nach remote, folgendermaßen vorgehen:
-- \copy "Tournament" FROM "../Tournament.csv" DELIMITER '|' QUOTE '^' CSV HEADER ENCODING 'UTF8'
Dabei folgendes beachten:
tournament.settings
baseline
: Basispunkte für jeden Spieler zu SaisonbeginnchallengeSame
: Wie oft darf der gleiche Gegner je Saison gefordert werdenmatchBonus
: Bonuspunkt(e) für jedes absolvierte MatchmatchPenalty
: Strafpunkt(e) für Fehlmatches pro SpieltagminMatches
: Wie viele Matches muss ein Spieler pro Spieltag spielen?minRound
: Ab welcher Runde erfolgen Punktabzüge?round.settings.rankInit
bonus
: Bonuspunkte zu Spieltagbeginnplayer
: player IDpoints
: Punkte zu Spieltagbeginnmatches
: Anzahl Matches zu Spieltagbeginnpenalty
: Strafpunkte zu Spieltagbeginnstrength
: Spielstärke zu Spieltagbeginnround.results.rankFinal
bonus
: Bonuspunkte Gesamt nach Spieltagplayer
: player ID,points
: Gesamtpunkte nach Spieltagmatches
: Gesamtanzahl Matches nach Spieltagpenalty
: Strafpunkte Gesamt nach SpieltagrankChange
: Rangänderung nach Spieltag