victorbjorklund

victorbjorklund

Phoenix Blog Post: Build your custom Phoenix phx.new generator

I’m showing you how you can customise the phx.new generator to give you a new Phoenix project the way YOU want it. In this post I show you an example of how we can add Oban preinstalled and configured to new Phoenix projects.

Most Liked

sodapopcan

sodapopcan

Nice article! I was working on a project around this called Vials. It sort of fell by the wayside when I started working again as I stopped calling mix phx.new so much tho I oddly started up on it again this week. I haven’t pushed anything in a while and there is an error in one of the examples in the readme :man_facepalming: but as someone who has clearly thought a lot about this as well, I’d be interested to know what you think of this approach! It is a working state but needs some polish.

victorbjorklund

victorbjorklund

Wow, that looks really cool. It is a different approach than mine in the sense you are using macros to tweak the generators.

niccolox

niccolox

makes sense if you have a site or app factory doing the same pattern over and over (I guess its obviously a comment)

in other ecosystems such as Drupal for instance, they have an Installation Profile and a Distribution concept and platforms like Acquia and Aegir can manage these site/app factories

platforms like Pantheon allow Drupal distributions to have a git upstream, so you can keep a core distro updated from an upstream proprietary or open source community distribution PLUS maintain a custom code and config

so, THANKS

Where Next?

Popular in Blog Posts Top

brainlid
Phoenix 1.7.0 brings a lot of new things when we run mix phx.gen my_app. These new and cool ways of doing things aren’t automatically bro...
New
mudasobwa
Blogged about the motivation and reasoning behind my idea to create yet another FSM library. Long story short: I did it in a proper way :...
New
danschultzer
How to set up the Content Security Policy header with Phoenix LiveView and support inline styles and scripts with CSP nonces.
New
JEG2
I’m closing out, for now, my series on questions at the heart of development with an analysis of when we need more abstraction. For exam...
New
New
brainlid
Phoenix LiveView v0.20.4 offers a hidden gem with its handy little JS.toggle_class/1 feature. This addition simplifies toggling classes f...
New
New
pillaiindu
Our very handsome and humble José Valim (@josevalim) just published Kubernetes and the Erlang VM: orchestration on the large and the sma...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
lawik
One of the Erlang ecosystem’s spiciest nerd snipes are hot code updates. Because it can do it. In ways that almost no other runtime can.
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
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
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

We're in Beta

About us Mission Statement