diff --git a/package.json b/package.json index 9b70ca8..b370918 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,38 @@ { - "name": "typesrpc", + "name": "@tonecn/typesrpc", "version": "1.0.0", - "description": "", - "main": "index.js", + "description": "A lightweight, type-safe RPC framework for TypeScript with deep nested API support", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist" + ], "scripts": { "test": "jest", "test:unit": "jest __tests__/unit", "test:integration": "jest __tests__/integration", "test:e2e": "jest __tests__/e2e", "test:coverage": "jest --coverage", - "build": "tsc", - "start": "tsc && tsc-alias && node dist/index.js" + "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json", + "start": "npm run build && tsc-alias && node dist/index.js" }, "keywords": [ "rpc", "typescript", - "remote-procedure-call", - "socket", - "realtime", - "type-safe", - "nested-api", - "bidirectional", - "pluggable", "socket.io", - "websocket", - "microservices", - "client-server", - "lightweight" + "type-safe", + "remote-procedure-call" ], "author": "tonecn", "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tonecn/typesrpc.git" + }, + "bugs": { + "url": "https://github.com/tonecn/typesrpc/issues" + }, + "homepage": "https://github.com/tonecn/typesrpc#readme", "dependencies": { "@types/express": "^5.0.3", "@types/md5": "^2.3.5", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..c9105ac --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "src/**/*" + ], + "exclude": [ + "__tests__", + "node_modules", + "dist" + ] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 551e005..40cbb97 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -50,7 +50,7 @@ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */