Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/womb0comb0/advent-of-typescript
Advent of Typescript template
https://github.com/womb0comb0/advent-of-typescript
advent-of-typescript-2024 cheerio puppeteer typescript
Last synced: 3 days ago
JSON representation
Advent of Typescript template
- Host: GitHub
- URL: https://github.com/womb0comb0/advent-of-typescript
- Owner: WomB0ComB0
- Created: 2024-12-03T18:33:40.000Z (26 days ago)
- Default Branch: master
- Last Pushed: 2024-12-26T03:16:46.000Z (4 days ago)
- Last Synced: 2024-12-26T04:23:31.409Z (4 days ago)
- Topics: advent-of-typescript-2024, cheerio, puppeteer, typescript
- Language: TypeScript
- Homepage:
- Size: 469 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of TypeScript Scraper
A tool to automatically fetch and organize TypeScript challenges from the Advent of TypeScript series.
## Features
- Automatically scrapes challenges from TypeHero's Advent of TypeScript
- Creates organized directory structure for each day
- Generates TypeScript configuration for each challenge
- Extracts challenge descriptions, initial code, and tests## Project Structure
```
advent-of-typescript/
├── src/
│ └── scraper.ts # Main scraper logic
├── {year}/ # Year directories (e.g., 2024)
│ └── {day}/ # Day directories (1-25)
│ ├── question.md # Challenge description
│ ├── question.d.ts # Type definitions
│ ├── tests.ts # Challenge tests
│ └── tsconfig.json # Local TypeScript config
└── tsconfig.json # Root TypeScript config```
## Getting Started
### Prerequisites
- [Bun](https://bun.sh) v1.1.36 or higher
- TypeScript 5.0+### Installation
```bash
# Clone the repository
git clone https://github.com/WomB0ComB0/advent-of-typescript
cd advent-of-typescript# Install dependencies
bun install
```### Usage
To fetch a specific day's challenge:
```bash
bun run start
```Example:
```bash
bun run start 2024 1
```To fetch all challenges for a given year:
```bash
bun start.ts
```## Development
The scraper uses:
- Puppeteer for web scraping
- Cheerio for HTML parsing
- TypeScript for type safety## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request## License
This project is licensed under the MIT License - see the LICENSE file for details.