mirror of
https://github.com/LucasVbr/game-lib.git
synced 2026-05-14 09:06:41 +00:00
5d8f9303ae
- Added package.json for project dependencies and scripts - Created Playwright configuration for end-to-end testing - Set up Inlang project settings for localization - Defined app types in app.d.ts - Created basic HTML structure in app.html - Implemented server hooks for localization in hooks.server.ts - Added hooks for URL rerouting in hooks.ts - Included favicon asset - Established library index for $lib alias - Developed Vitest example components and tests - Created layout and page components for routing - Implemented demo pages for Paraglide and Playwright - Added global CSS styles for layout - Configured Vite for project build and testing - Included robots.txt for web crawling instructions - Set up TypeScript configuration for the project
42 lines
1013 B
TypeScript
42 lines
1013 B
TypeScript
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { defineConfig } from 'vitest/config';
|
|
import { playwright } from '@vitest/browser-playwright';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
sveltekit(),
|
|
paraglideVitePlugin({ project: './project.inlang', outdir: './src/lib/paraglide' })
|
|
],
|
|
test: {
|
|
expect: { requireAssertions: true },
|
|
projects: [
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'client',
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
instances: [{ browser: 'chromium', headless: true }]
|
|
},
|
|
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
|
|
exclude: ['src/lib/server/**']
|
|
}
|
|
},
|
|
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'server',
|
|
environment: 'node',
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
|
|
}
|
|
}
|
|
]
|
|
}
|
|
});
|