chore: scaffold @green-tea/core with vitest and strict ts

This commit is contained in:
chrnx committed 2026-06-26 00:29:40 -05:00
commit 04e4ae5c54
7 files changed
+1530

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# Local specs & plans — not committed
.specs/
# Node
node_modules/
dist/
coverage/
*.log
# Env
.env
.env.*
+1464
View File
File diff suppressed because it is too large. Load diff
+23
View File
@@ -0,0 +1,23 @@
{
"name": "@green-tea/core",
"version": "0.0.0",
"description": "Declarative, type-safe HTTP framework. The pipeline is a graph, not a middleware chain.",
"license": "MIT",
"type": "commonjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.json",
"test": "vitest run",
"test:dev": "vitest",
"typecheck": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"typescript": "^5.5.0",
"vitest": "^2.0.0",
"@types/node": "^18.19.0"
}
}
+2
View File
@@ -0,0 +1,2 @@
import 'reflect-metadata';
export const VERSION = '0.0.0';
+6
View File
@@ -0,0 +1,6 @@
import { expect, test } from 'vitest';
import { VERSION } from '../src/index';
test('package loads and exposes VERSION', () => {
expect(VERSION).toBe('0.0.0');
});
+18
View File
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"moduleResolution": "node",
"lib": ["es2020"],
"declaration": true,
"outDir": "dist",
"rootDir": ".",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src", "test", "example"]
}
+5
View File
@@ -0,0 +1,5 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: { globals: false, environment: 'node', include: ['test/**/*.test.ts'] },
});