evrythng / epcis2.js

EPCIS 2.0 Javascript SDK
Apache License 2.0
35 stars 4 forks source link

Added Typescript defs; need to integrate w/NPM publish. #52

Closed vagabondrev closed 1 year ago

vagabondrev commented 1 year ago

Hey Guys --

I'd like to add Typescript support. I've added a tsconfig.json file and added the compile step to the package.json. The d.ts definitions are now published with the .js files in the ./dist folder. Still need to include them with the NPM package, but not sure how you'd like to handle that, (bundled/publish to @types).

Let me know your thoughts...

Scott --

clementh59 commented 1 year ago

Hi Scott,

Thanks a lot for this initiative. It is much appreciated.

I'll look into it in the coming days. Meanwhile, I had some build errors on my side, I had to add a dev dependency. I've also added an example in the appropriate folder. That would be great if you can have a look into the PR: https://github.com/vagabondrev/epcis2.js/pull/1

Thanks a lot, Clement

vagabondrev commented 1 year ago

Hey Clement -

I've merged your changes into my fork of the repo, and added some comments to the tsconfig.json to help decide which approach you prefer for publication of the module.

I'll close this PR and open another with those updates.

Scott -