Skip to content

Commit

Permalink
feat: Publish TypeScript types in Feast UI package
Browse files Browse the repository at this point in the history
This makes the TypeScript definitions available in TypeScript projects that
use Feast UI as a module.
  • Loading branch information
peruukki committed Sep 21, 2024
1 parent 76b4576 commit 98c9bc4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dist"
],
"main": "./dist/feast-ui.cjs",
"types": "./dist/FeastUI.d.ts",
"module": "./dist/feast-ui.module.js",
"peerDependencies": {
"@elastic/datemath": "^5.0.3",
Expand Down Expand Up @@ -54,8 +55,8 @@
"scripts": {
"start": "npm run generate-protos && react-scripts start",
"build": "npm run generate-protos && react-scripts build",
"build:lib": "npm run generate-protos && rimraf ./dist && tsc && rollup -c",
"build:lib-dev": "npm run generate-protos && rimraf ./dist && tsc && rollup -c && yalc publish -f",
"build:lib": "npm run generate-protos && rimraf ./dist && tsc --project ./tsconfig.build.json && rollup -c",
"build:lib-dev": "npm run build:lib && yalc publish -f",
"test": "npm run generate-protos && react-scripts test",
"eject": "react-scripts eject",
"generate-protos": "pbjs --no-encode -o src/protos.js -w commonjs -t static-module `find ../protos/feast/ -iname *.proto` && pbts -n protos -o src/protos.d.ts src/protos.js"
Expand Down
11 changes: 11 additions & 0 deletions ui/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "./dist",
"rootDir": "./src"
}
}

0 comments on commit 98c9bc4

Please sign in to comment.