Skip to content

Commit

Permalink
chore: get lib-rpc ready for npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
justmoon committed Oct 13, 2024
1 parent e5d7e9b commit 22774f8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
33 changes: 25 additions & 8 deletions packages/lib-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,46 @@
{
"name": "@dassie/lib-rpc",
"type": "module",
"version": "0.0.0",
"private": true,
"description": "RPC library for communicating between TypeScript processes",
"type": "module",
"exports": {
"./server": {
"import": "./src/server/index.ts"
},
"./client": {
"import": "./src/client/index.ts"
"./server": "./src/server/index.ts",
"./client": "./src/client/index.ts"
},
"sideEffects": false,
"publishConfig": {
"exports": {
"./server": {
"types": "./dist/server/index.d.ts",
"default": "./dist/server/index.js"
},
"./client": {
"types": "./dist/client/index.d.ts",
"default": "./dist/client/index.js"
}
}
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc && rollup -c",
"lint": "eslint --color .",
"typecheck": "tsc --pretty"
},
"files": [
"dist/server/index.js",
"dist/server/index.js.map",
"dist/server/index.d.ts",
"dist/client/index.js",
"dist/client/index.js.map",
"dist/client/index.d.ts"
],
"author": {
"name": "Stefan Thomas",
"email": "justmoon@members.fsf.org",
"url": "https://justmoon.com/"
},
"license": "Apache-2.0",
"devDependencies": {
"@dassie/meta-rollup-config": "workspace:^",
"@dassie/meta-tsconfig": "workspace:^",
"type-fest": "^4.26.1"
},
Expand Down
12 changes: 12 additions & 0 deletions packages/lib-rpc/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { entrypoint } from "@dassie/meta-rollup-config"

const config = [
...entrypoint("server/index", {
external: ["zod", "@dassie/lib-type-utils"],
}),
...entrypoint("client/index", {
external: ["zod", "@dassie/lib-type-utils"],
}),
]

export default config
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 22774f8

Please sign in to comment.