Skip to content

Commit 48cbdea

Browse files
branchseerclaude
andcommitted
chore: add playground workspace for manual testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e105318 commit 48cbdea

27 files changed

+164
-0
lines changed

playground/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Playground
2+
3+
A workspace for manually testing `vp run` (the task runner).
4+
5+
## Structure
6+
7+
```
8+
playground/
9+
├── packages/
10+
│ ├── app/ → depends on @playground/lib
11+
│ ├── lib/ → depends on @playground/utils
12+
│ └── utils/ → no dependencies
13+
└── vite-task.json → workspace-level task config
14+
```
15+
16+
Dependency chain: `app → lib → utils`
17+
18+
## Scripts & Tasks
19+
20+
Tasks are defined in each package's `vite-task.json` with caching enabled. `dev` is a package.json script (not cached).
21+
22+
| Name | Type | Packages | Cached | Description |
23+
| ----------- | ------ | --------------- | ------ | ---------------------------------------------- |
24+
| `build` | task | app, lib, utils | yes | Prints a build message |
25+
| `test` | task | app, lib, utils | yes | Prints a test message |
26+
| `lint` | task | app, lib, utils | yes | Prints a lint message |
27+
| `typecheck` | task | app, lib | yes | Prints a typecheck message |
28+
| `dev` | script | app, lib | no | Long-running process (prints every 2s, ctrl-c) |

playground/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "playground",
3+
"private": true
4+
}

playground/packages/app/build.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Building app');

playground/packages/app/dev.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
process.on('SIGINT', () => {
2+
console.log('app: dev server stopped');
3+
process.exit(0);
4+
});
5+
6+
setInterval(() => console.log('app: waiting for changes...'), 2000);

playground/packages/app/lint.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Linting app');
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "@playground/app",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "node dev.mjs"
7+
},
8+
"dependencies": {
9+
"@playground/lib": "workspace:*"
10+
}
11+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { sum } from '@playground/lib';
2+
3+
console.log(sum(1, 2, 3));

playground/packages/app/test.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Testing app');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Typechecking app');
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"tasks": {
3+
"build": {
4+
"command": "node build.mjs"
5+
},
6+
"test": {
7+
"command": "node test.mjs"
8+
},
9+
"typecheck": {
10+
"command": "node typecheck.mjs"
11+
},
12+
"lint": {
13+
"command": "node lint.mjs"
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)