Skip to content

Commit b8d29b9

Browse files
feat(playground): add playground package scaffold (#120)
* feat(playground): add playground package scaffold
1 parent 2966a45 commit b8d29b9

6 files changed

Lines changed: 111 additions & 4 deletions

File tree

bun.lock

Lines changed: 21 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/playground/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# deps
2+
node_modules/

packages/playground/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# @t-req/playground
2+
3+
Development playground for testing `treq init` functionality without external dependencies.
4+
5+
## Purpose
6+
7+
This package provides a self-contained environment for developing and testing t-req initialization features. It removes the need to rely on third-party dependencies during development by providing a local server and test environment.
8+
9+
## Getting Started
10+
11+
### Prerequisites
12+
13+
- [Bun](https://bun.sh) installed
14+
15+
### Installation
16+
17+
```bash
18+
bun install
19+
```
20+
21+
### Development
22+
23+
Start the development server with hot reloading:
24+
25+
```bash
26+
bun run dev
27+
```
28+
29+
The server will start at `http://localhost:3000`.
30+
31+
## Usage
32+
33+
The playground currently exposes a simple Hono server for testing. You can extend this to:
34+
35+
- Test t-req initialization workflows
36+
- Mock external API responses
37+
- Validate request/response handling
38+
- Experiment with new features before integrating into the main packages
39+
40+
## Project Structure
41+
42+
```
43+
.
44+
├── src/
45+
│ └── index.ts # Main server entry point
46+
├── package.json # Dependencies (Hono + Bun types)
47+
├── tsconfig.json # TypeScript configuration
48+
└── README.md # This file
49+
```
50+
51+
## Related Packages
52+
53+
- [`@t-req/core`](../core) - Core parsing and execution engine
54+
- [`@t-req/app`](../app) - CLI, TUI, and server implementation
55+
56+
## License
57+
58+
See repository root for license information.

packages/playground/package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@t-req/playground",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "bun run --hot src/index.ts"
7+
},
8+
"dependencies": {
9+
"hono": "^4.12.5"
10+
},
11+
"devDependencies": {
12+
"@types/bun": "latest"
13+
}
14+
}

packages/playground/src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Hono } from 'hono';
2+
3+
const app = new Hono();
4+
5+
app.get('/', (c) => {
6+
return c.text('Hello Hono!');
7+
});
8+
9+
export default app;

packages/playground/tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"strict": true,
4+
"jsx": "react-jsx",
5+
"jsxImportSource": "hono/jsx"
6+
}
7+
}

0 commit comments

Comments
 (0)