chore: scaffold @green-tea/core with vitest and strict ts
This commit is contained in:
7 files changed
+1530
No files matched your search
+12
@@ -0,0 +1,12 @@
|
|||||||
|
# Local specs & plans — not committed
|
||||||
|
.specs/
|
||||||
|
|
||||||
|
# Node
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
coverage/
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Env
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
Generated
+1464
File diff suppressed because it is too large.
Load diff
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
import 'reflect-metadata';
|
||||||
|
export const VERSION = '0.0.0';
|
||||||
@@ -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');
|
||||||
|
});
|
||||||
@@ -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"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: { globals: false, environment: 'node', include: ['test/**/*.test.ts'] },
|
||||||
|
});
|
||||||
Reference in new issue
Block a user