Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm installable javascript DJ client #484

Merged
merged 13 commits into from
May 3, 2023
Merged

npm installable javascript DJ client #484

merged 13 commits into from
May 3, 2023

Conversation

samredai
Copy link
Contributor

@samredai samredai commented May 1, 2023

Summary

This adds an ES6 javascript DJ client that's npm installable. This PR only includes the get endpoints to pull entities but in a follow-up PR I'll add the ability to create entities as well.

update: I've restructured this a bit to use webpack with the type set as universal module definition (UMD) so we can use the single published npm package for both server side and client side javascript. (read more here)

Test Plan

N/A

Deployment Plan

N/A

Copy link
Contributor

@shangyian shangyian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the one comment, looks good to me! To get the build-working we'll probably need to set the linters to run only on Python code and then add JS linters to the build in a separate path.

client/javascript/src/httpclient.js Outdated Show resolved Hide resolved
@samredai
Copy link
Contributor Author

samredai commented May 2, 2023

Thanks @shangyian, updated the python builds to ignore the client/javascript directory then added an eslint script and some workflow steps to build and lint the js client.

@agorajek or @betodealmeida not urgent but we should add the javascript jobs to be required checks for merging PRs. Also we have to setup a release job using an npm access token just like we did with pypi. I went ahead and published the 0.0.1-rc.0 version for now: https://www.npmjs.com/package/datajunction/v/0.0.1-rc.0

@samredai samredai marked this pull request as ready for review May 2, 2023 03:10
@samredai samredai merged commit 34a0eb0 into DataJunction:main May 3, 2023
youngman-droid pushed a commit to youngman-droid/dj that referenced this pull request Aug 26, 2023
* npm installable javascript DJ client

* remove test.html file

* add javascript linters and build workflow

* fix docs

* Set javascript steps working-directory

* add a step to install babel

* npm install dev dependencies

* working-dir

* lint the github workflow definition

* create a UMD hybrid module using webpack

* no need to set lodash as external, not using

* Set version to 0.0.1-rc.0

* Change docs example to list metrics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants