axelson

axelson

Scenic Core Team

Build assets for dependent phoenix application

I have an application (a nerves application actually) that depends on a phoenix application. Are there any patterns facilitate building the assets in this case? Is it generally required to precompile the assets and commit them into the git repository?

I’ve been hacking around it by cd’ing into the deps directory and running npm install inside there and modifying the phoenix application configuration to point to to the deps directory but this is hacky and generally it isn’t good to build things inside the deps directory.

I tried to search to see if anyone has already asked about this but it was quite hard to find a good search term and I don’t recall anyone asking on the forum before.

Here’s a link to the project: GitHub - axelson/scenic-side-screen: Top-level app that runs multiple scenic apps underneath it · GitHub
And here’s the phoenix dependency: GitHub - axelson/govee_phx: Phoenix LiveView interface to Govee H6001 LED Bulb · GitHub

First Post!

LostKobrakai

LostKobrakai

You could look at how phoenix/phoenix libraries like live_dashboard do it and it seems to boil down to shipping the compiled asset in priv/….

Other options can be:

  • A custom mix compiler in the phoenix project.
  • Aliasing compile.app (example)

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New

Other popular topics Top

marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement