ples work
All checks were successful
Publish Docker Images / docker (push) Successful in 40s

This commit is contained in:
Lee
2023-11-16 12:16:52 +00:00
parent 36d07fa8dd
commit 805e698668
13 changed files with 458 additions and 89 deletions

View File

@ -6,6 +6,10 @@
"publishConfig": {
"access": "public"
},
"main": "./src/index.ts",
"types": "./src/index.ts"
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts"
}
}

View File

@ -1,4 +1,4 @@
import express from "express";
import express, { Express } from "express";
type ServerType = {
/**
@ -10,7 +10,7 @@ type ServerType = {
onLoaded?: () => void;
};
export function createServer({ port = 3000, onLoaded }: ServerType) {
export function createServer({ port = 3000, onLoaded }: ServerType): Express {
if (typeof port === "string") {
port = Number(port);
if (isNaN(port)) {

View File

@ -14,5 +14,5 @@
"noEmit": true,
"lib": ["es2022", "dom", "dom.iterable"]
},
"exclude": ["node_modules"]
"exclude": ["node_modules", "dist"]
}

View File

@ -6,6 +6,10 @@
"publishConfig": {
"access": "public"
},
"main": "./src/index.ts",
"types": "./src/index.ts"
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts"
}
}

View File

@ -1,7 +1,7 @@
{
"extends": "tsconfig/server.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
}
"extends": "tsconfig/server.json"
// "compilerOptions": {
// "outDir": "dist",
// "rootDir": "src"
// }
}