Skip to content

Commit

Permalink
use typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp committed Nov 26, 2024
1 parent d41fd4f commit da78db9
Show file tree
Hide file tree
Showing 23 changed files with 17,797 additions and 65 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
},
"devDependencies": {
"@changesets/cli": "^2.27.9",
"@livekit/changesets-changelog-github": "^0.0.4"
}
"@livekit/changesets-changelog-github": "^0.0.4",
"esbuild": "^0.24.0"
},
"packageManager": "[email protected]+sha1.886364ebd6dae009284bebc56ed4296bb6dd557a"
}
3 changes: 1 addition & 2 deletions packages/javascript/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules/
src/gen
!src/gen/version.d.ts
dist/
36 changes: 17 additions & 19 deletions packages/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,38 @@
"version": "1.27.1",
"description": "",
"type": "module",
"main": "src/index.js",
"import": "src/index.cjs",
"types": "src/index.d.ts",
"main": "dist/index.js",
"import": "dist/index.cjs",
"types": "dist/index.d.ts",
"files": [
"src"
"dist"
],
"exports": {
".": {
"types": "./src/index.d.ts",
"import": "./src/index.js",
"require": "./src/index.cjs"
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./*": {
"types": "./src/gen/dts/livekit_*_pb.d.ts",
"import": "./src/gen/esm/livekit_*_pb.js",
"require": "./src/gen/cjs/livekit_*_pb.cjs"
"types": "./dist/gen/livekit_*_pb.d.ts",
"import": "./dist/gen/livekit_*_pb.js",
"require": "./dist/gen/livekit_*_pb.cjs"
}
},
"scripts": {
"generate:version:esm": "genversion --esm --semi src/gen/version.mjs",
"generate:version:cjs": "genversion --semi src/gen/version.cjs",
"generate:version": "pnpm generate:version:esm && pnpm generate:version:cjs",
"generate:proto:esm": "protoc --es_out src/gen --es_opt target=js -I=../../protobufs ../../protobufs/livekit_*.proto",
"generate:proto:cjs": "protoc --es_out src/gen --es_opt target=js,js_import_style=legacy_commonjs -I=../../protobufs ../../protobufs/livekit_*.proto && rename \"s/js$/cjs/\" src/gen/*.js && sed -i 's/\\.js\")/.cjs\")/' src/gen/*.cjs",
"generate:proto:dts": "protoc --es_out src/gen --es_opt target=dts -I=../../protobufs ../../protobufs/livekit_*.proto",
"generate:proto": "pnpm generate:proto:cjs && pnpm generate:proto:esm && pnpm generate:proto:dts",
"build": "pnpm generate:version && pnpm generate:proto"
"generate:version": "genversion --esm --semi src/gen/version.ts",
"generate:proto": "protoc --es_out src/gen --es_opt target=ts -I=../../protobufs ../../protobufs/livekit_*.proto",
"prebuild": "pnpm generate:version && pnpm generate:proto",
"build": "pnpm prebuild && tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\""
},
"keywords": [],
"author": "LiveKit",
"license": "Apache-2.0",
"devDependencies": {
"@bufbuild/protoc-gen-es": "^1.10.0",
"genversion": "^3.2.0"
"genversion": "^3.2.0",
"tsup": "^8.3.5",
"typescript": "^5.7.2"
},
"dependencies": {
"@bufbuild/protobuf": "^1.10.0"
Expand Down
Loading

0 comments on commit da78db9

Please sign in to comment.