Add shared TypeScript package
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
type: library
|
||||||
|
language: typescript
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
typecheck:
|
||||||
|
command: bun run typecheck
|
||||||
|
inputs:
|
||||||
|
- src/**/*
|
||||||
|
- tsconfig.json
|
||||||
|
- package.json
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "@zeavis/shared",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./src/index.ts",
|
||||||
|
"./app-status": "./src/app-status.ts"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"typecheck": "tsc --project tsconfig.json"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^5.6.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
export type AppStatus = {
|
||||||
|
name: 'ZeaVis Edu';
|
||||||
|
status: 'ok';
|
||||||
|
version: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function createAppStatus(version = '0.1.0'): AppStatus {
|
||||||
|
return {
|
||||||
|
name: 'ZeaVis Edu',
|
||||||
|
status: 'ok',
|
||||||
|
version,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export type { AppStatus } from './app-status';
|
||||||
|
export { createAppStatus } from './app-status';
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["ES2022"],
|
||||||
|
"types": []
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user