# How to develop and publish library that combines JavaScript and Elixir code?

**URL:** <https://forum.elixirforum.com/t/how-to-develop-and-publish-library-that-combines-javascript-and-elixir-code/41206>\
**Category:** Questions\
**Tags:** hex, phoenix, javascript, development\
**Created:** [July 23, 2021, 10:03am UTC](https://forum.elixirforum.com/t/how-to-develop-and-publish-library-that-combines-javascript-and-elixir-code/41206 "2021-07-23T10:03:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![LostKobrakai](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/32/3072_2.png) [@LostKobrakai](https://forum.elixirforum.com/u/LostKobrakai)\
**Post date:** [July 23, 2021, 10:21am UTC](https://forum.elixirforum.com/t/how-to-develop-and-publish-library-that-combines-javascript-and-elixir-code/41206/2 "2021-07-23T10:21:21Z")

</div>

> [@mickel8](#):
>
> why do you include bundled JS code in `priv` directory on github instead of e.g. augmenting `mix compile` task to compile also this JS code.

This is so people, who do not actively develop the phoenix, don’t need all the required toolchain for building it. The second reason is that phoenix also publishes to npm and the compiled asset is one of its assets. It also gives people a way to just download the compiled file and load it in a website again without needing the toolchain.

It’s far simpler to supply people with the source files and compiled assets – which allows them to either use their own toolchain or non – compared to making people deal with phoenix toolchain and potentially their own as well.

---

_[View the full topic](https://forum.elixirforum.com/t/how-to-develop-and-publish-library-that-combines-javascript-and-elixir-code/41206)._
