A modern, sleek typing speed game built with Svelte 5. Test your typing speed and accuracy with randomly selected passages.
Clone this repository or navigate to the project directory:
cd Typing-game
Install dependencies:
npm install
Start the development server:
npm run dev
Open your browser and visit http://localhost:5173
npm run build
This creates an optimized production build in the dist folder.
# Initialize git repository (if not already done)
git init
# Add all files
git add .
# Commit your changes
git commit -m "Initial commit - TypeRacer clone"
# Add GitHub remote
git remote add origin <your-github-repo-url>
# Push to GitHub
git push -u origin main
If your default branch is master instead of main, use:
git push -u origin master
npm run builddistNetlify will automatically:
# Install Netlify CLI
npm install -g netlify-cli
# Login to Netlify
netlify login
# Initialize Netlify site
netlify init
# Deploy
netlify deploy --prod
In your Netlify dashboard:
Typing-game/
āāā src/
ā āāā lib/
ā ā āāā passages.js # Text passages for typing
ā ā āāā StartScreen.svelte # Start screen component
ā ā āāā RaceScreen.svelte # Main typing game component
ā ā āāā ResultsScreen.svelte # Results display component
ā āāā App.svelte # Main app component
ā āāā main.js # Entry point
āāā index.html # HTML template
āāā package.json # Dependencies
āāā vite.config.js # Vite configuration
āāā netlify.toml # Netlify configuration
āāā README.md # This file
Edit src/lib/passages.js and add new strings to the passages array:
export const passages = [
"Your new passage here...",
// ... more passages
];
The app uses CSS gradients defined in each component's <style> section. Look for linear-gradient to customize colors.
MIT
Feel free to submit issues and pull requests!