kewisch / sepa.js

Create and validate SEPA XML transactions
http://kewisch.github.io/sepa.js
Other
88 stars 61 forks source link

Update npm version #44

Closed converter-user-old closed 1 year ago

converter-user-old commented 3 years ago

@kewisch Are there any plans to release the current version to npm?

kewisch commented 2 years ago

There are a few easy enhancements in the issue list that I'd love to incorporate, but I hope I find time to release as well.

teeleh commented 1 year ago

Hi Kewisch, would it be possible to package your code up into one package and publish on https://unpkg.com/ ? You can easily do this (according to them) using the following instructions:

Workflow For npm package authors, unpkg relieves the burden of publishing your code to a CDN in addition to the npm registry. All you need to do is include your UMD build in your npm package (not your repo, that's different!).

You can do this easily using the following setup:

Add the umd (or dist) directory to your .gitignore file Add the umd directory to your files array in package.json Use a build script to generate your UMD build in the umd directory when you publish That's it! Now when you npm publish you'll have a version available on unpkg as well.

Thanks a lot !

kewisch commented 1 year ago

I'm not using any build scripts. Does https://unpkg.com/sepa.js@0.8.0/lib/sepa.min.js work for you?

teeleh commented 1 year ago

Hi Phillip,

Thank you for your quick response. I would like to use your library in a tool we use to build a back office application: www.retool.comhttp://www.retool.com

I tried your unpkg link, but Retool does not like it:

[Graphical user interface, text, application, email Description automatically generated]

In Retool it is not possible to use require() and everything should be riding in one package. Here is the response to a similar question:

“For JS library imports we support files that contain the entire library. The link you tried has imports to other files and so that won’t work.”

I don’t know how to do that (put it all one package). Here is an example of another library that had the same problem trying to get it to run in Retool.com (the Question and the Answer to the solution:

Q: Trying to load this module following the instructions in the docs: @.***/index.min.js But I’m not able to call it in a Retool JS query or JS transformer. Any thoughts?

CONTENT: /**

A: You need to use @.***/dist/shortid-2.2.13.min.js which has all code in one package.

My question to you is if you know how to get sepa-xml into one package like above, I guess you have the experience to do this quite quickly.

Thank you so much for your time, Teele Horstra

kewisch commented 1 year ago

Ah I see. Filed https://github.com/kewisch/sepa.js/issues/47 for this

danieldiekmeier commented 1 year ago

Thank you for the package, @kewisch! Would you consider releasing the latest commit from main as 1.0.4, maybe? The dependency on xmldom leads to security warnings in npm audit. For me, it would be very helpful if you released it, even if you didn't include any other changes for now.

kewisch commented 1 year ago

Done, hope it works well!

danieldiekmeier commented 1 year ago

Thank you!