hack-chat / hackchat-engine

A NodeJS and browser friendly JavaScript library used to interact with a hackchat server
8 stars 4 forks source link

Provide UMD builds #1

Open mochaaP opened 3 years ago

mochaaP commented 3 years ago

Expected Behavior

An npm script like npm run build:umd would be available that would compile this library into a format that made Client available on the window.

Current Behavior

No build system is used in this project.

Context

https://rollupjs.org/guide/en/ is a good point to start with. I'm not super familiar with most of the build tools or I would try submit a PR, but hopefully there's a straightforward solution.

Thank you for your time!

marzavec commented 3 years ago

Agreed, this would be a handy feature to have for some use cases. At a guess, I'd have to mix in webpack and babel to transpile it out. I'll see what I can do about getting this going at some point in the future, will update this issue with news

mochaaP commented 3 years ago

I already compiled one with Rollup (maybe not the best practice), but anyways here's a patch:

http://fars.ee/42fu.patch

marzavec commented 3 years ago

If that's working, great! I'll also get an official build path put in place when I'm able

mochaaP commented 3 years ago

esbuild is also an interesting bundler.