https://github.com/yamcodes/stopwatch
A simple stopwatch app built with SolidJS
https://github.com/yamcodes/stopwatch
solid solidjs
Last synced: 5 months ago
JSON representation
A simple stopwatch app built with SolidJS
- Host: GitHub
- URL: https://github.com/yamcodes/stopwatch
- Owner: yamcodes
- License: mit
- Created: 2024-06-23T18:04:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T17:29:54.000Z (over 1 year ago)
- Last Synced: 2025-03-08T22:03:21.156Z (over 1 year ago)
- Topics: solid, solidjs
- Language: TypeScript
- Homepage:
- Size: 206 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stopwatch
A simple stopwatch app built with SolidJS.
## Features
- Start, pause, and reset the stopwatch
- Keyboard shortcuts (space to start/pause, r to reset)
- Lightweight and fast
- Responsive design adapting to screen resizing
## Development
### Prerequisites
- Node.js (v18 or later)
- pnpm (v9 or later)
### Installation
1. Clone the repository:
```
git clone https://github.com/yamcodes/stopwatch
```
2. Change to the project directory:
```
cd stopwatch
```
3. Install dependencies:
```
pnpm install
```
### Running the App
To start the development server, run:
```
pnpm dev
```
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
### Building for Production
To build the app for production, run:
```
pnpm build
```
The optimized and minified files will be generated in the `dist` folder.
## Usage
- Press the spacebar or click the "Start" button to start the stopwatch
- Press the spacebar or click the "Pause" button to pause the stopwatch
- Press "R" or click the "Reset" button to reset the stopwatch
## Keyboard Shortcuts
```ts
const KEYS = {
START_OR_PAUSE: ' ',
RESET: 'r',
} as const;
```
## Deployment
You can deploy the `dist` folder to any static host provider (Netlify, Surge, Now, etc.)
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
This project is licensed under the MIT License - see [LICENSE](LICENSE) for details.