-
Notifications
You must be signed in to change notification settings - Fork 998
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Make Feast UI importable as a NPM Module (#2370)
* Make FeastUI publishable as NPM Module Signed-off-by: Tony Chu <[email protected]> * Fixes tests Signed-off-by: Tony Chu <[email protected]> * Add Feature Flags as Config Signed-off-by: Tony Chu <[email protected]> * Update package.json Signed-off-by: Tony Chu <[email protected]> * Make where to fetch projects configurable. Signed-off-by: Tony Chu <[email protected]> * Match Feast's License Signed-off-by: Tony Chu <[email protected]> * Better error messages for missing Project List Signed-off-by: Tony Chu <[email protected]> * Fix typo and remove gitignore Signed-off-by: Tony Chu <[email protected]> * Add customization instructions to the README Signed-off-by: Tony Chu <[email protected]> * Add back tests and document publishing Signed-off-by: Tony Chu <[email protected]>
- Loading branch information
Showing
80 changed files
with
2,928 additions
and
2,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [["@babel/preset-env"], ["@babel/preset-react"]], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Publishing the Feast Package to NPM | ||
|
||
The Feast UI is published as a module to NPM and can be found here: https://www.npmjs.com/package/@feast-dev/feast-ui | ||
|
||
To publish a new version of the module, you will need to be part of the @feast-dev team in NPM. Ask Tony to add you if necessary. You will also need to [login to your NPM account on the command line](https://docs.npmjs.com/cli/v8/commands/npm-adduser). | ||
|
||
## Steps for Publishing | ||
|
||
1. Make sure tests are passing. Run tests with `yarn tests` in the ui directory. | ||
2. Bump the version number in `package.json` as appropriate. | ||
3. Package the modules for distributions. Run the library build script with `yarn build:lib`. We use [Rollup](https://rollupjs.org/) for building the module, and the configs are in the `rollup.config.js` file. | ||
4. Publish the package to NPM. Run `npm publish` | ||
5. [Check NPM to see that the package was properly publish](https://www.npmjs.com/package/@feast-dev/feast-ui). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,58 @@ | ||
{ | ||
"name": "feast-ui", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"name": "@feast-dev/feast-ui", | ||
"version": "0.19.0", | ||
"private": false, | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/feast-ui.cjs", | ||
"module": "./dist/feast-ui.module.js", | ||
"peerDependencies": { | ||
"@elastic/datemath": "^5.0.3", | ||
"@elastic/eui": "^50.0.0", | ||
"@emotion/react": "^11.8.1", | ||
"@testing-library/jest-dom": "^5.16.2", | ||
"@testing-library/react": "^12.1.3", | ||
"@testing-library/user-event": "^13.5.0", | ||
"@elastic/eui": "^46.1.0", | ||
"@emotion/react": "^11.7.1", | ||
"@types/d3": "^7.1.0", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.21", | ||
"@types/react": "^17.0.39", | ||
"@types/react-dom": "^17.0.13", | ||
"@types/react": "^17.0.20", | ||
"@types/react-dom": "^17.0.9", | ||
"d3": "^7.3.0", | ||
"inter-ui": "^3.19.3", | ||
"moment": "^2.29.1", | ||
"prop-types": "^15.8.1", | ||
"query-string": "^7.1.1", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-query": "^3.34.16", | ||
"react-query": "^3.34.12", | ||
"react-router-dom": "6", | ||
"react-scripts": "^5.0.0", | ||
"typescript": "^4.4.2", | ||
"use-query-params": "^1.2.3", | ||
"zod": "^3.11.6" | ||
}, | ||
"dependencies": { | ||
"@elastic/datemath": "^5.0.3", | ||
"@elastic/eui": "^46.1.0", | ||
"@emotion/react": "^11.7.1", | ||
"@types/d3": "^7.1.0", | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^16.7.13", | ||
"@types/react": "^17.0.20", | ||
"@types/react-dom": "^17.0.9", | ||
"d3": "^7.3.0", | ||
"inter-ui": "^3.19.3", | ||
"moment": "^2.29.1", | ||
"prop-types": "^15.8.1", | ||
"query-string": "^7.1.1", | ||
"react-query": "^3.34.12", | ||
"react-router-dom": "6", | ||
"react-scripts": "5.0.0", | ||
"typescript": "^4.6.2", | ||
"react-scripts": "^5.0.0", | ||
"use-query-params": "^1.2.3", | ||
"web-vitals": "^2.1.4", | ||
"zod": "^3.13.4" | ||
"zod": "^3.11.6" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"build:lib": "rimraf ./dist && tsc && rollup -c", | ||
"build:lib-dev": "rimraf ./dist && tsc && rollup -c && yalc publish -f", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
}, | ||
|
@@ -59,6 +80,43 @@ | |
] | ||
}, | ||
"devDependencies": { | ||
"msw": "^0.38.2" | ||
"@babel/core": "^7.17.5", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-react": "^7.16.7", | ||
"@rollup/plugin-babel": "^5.3.1", | ||
"@rollup/plugin-commonjs": "^21.0.2", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@rollup/plugin-typescript": "^8.3.1", | ||
"@testing-library/jest-dom": "^5.14.1", | ||
"@testing-library/react": "^12.0.0", | ||
"@testing-library/user-event": "^13.2.1", | ||
"msw": "^0.36.8", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.68.0", | ||
"rollup-plugin-copy": "^3.4.0", | ||
"rollup-plugin-import-css": "^3.0.2", | ||
"rollup-plugin-svg": "^2.0.0", | ||
"rollup-plugin-svgo": "^1.1.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.4.2" | ||
}, | ||
"description": "Web UI for the [Feast Feature Store](https://feast.dev/)", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/feast-dev/feast.git" | ||
}, | ||
"keywords": [ | ||
"Feast", | ||
"Feature", | ||
"Store" | ||
], | ||
"author": "[email protected]", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/feast-dev/feast/issues" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.