A demonstration application showcasing core Svelte features including reactive declarations, component props, event handling, conditional rendering, list rendering, two-way binding, stores, and transitions.
svelte-prototype/
├── src/
│ ├── components/ # Svelte components
│ ├── App.svelte # Root component
│ ├── main.js # Application entry point
│ └── app.css # Global styles
├── tests/
│ ├── unit/ # Unit tests
│ └── properties/ # Property-based tests
├── index.html # HTML entry point
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
├── vitest.config.js # Vitest configuration
└── svelte.config.js # Svelte configuration
Install dependencies:
npm install
Run the development server:
npm run dev
Run all tests:
npm test
Run tests with UI:
npm run test:ui
Build for production:
npm run build
Preview production build:
npm run preview
This project uses a dual testing approach:
$: syntax{#if}, {:else}, {:else if} blocks{#each} blocks with keyed itemsbind:value and bind:checked