kevinlang
Phx_gen_tailwind - easily add Tailwind to a new Phoenix 1.6+ project
Hey all,
I created a phx.gen.tailwind Mix task that adds Node + TailwindCSS to a new Phoenix project. Essentially, it does the following steps for you:
- Copy over a
package.jsonfile into yourassets/directory withtailwindcssas a dev dependency - Copy over a sane default
tailwind.config.jsto yourassets/directory - Modifies your
assets/js/app.jsfile to no longer import CSS, since we are not using ESBuild for CSS processing - Modifies your
assets/css/app.cssfile to import TailwindCSS and no longer importphoenix.css - Updates the aliases in your
mix.exsfile - Prompts to install your new NPM dependencies (tailwindcss)
Pretty much based on the PR by José.
Cheers,
Kevin
Most Liked
ambareesha7
hey thank you for your work 
is it possible to add more mix commands to your library for different CSS frameworks
let’s say,
project A i wanted to add TailwindCSS
project B i wanted to add BulmaCSS,
project C i wanted to add BootstrapCSS … etc
1
Popular in Libraries
Hi everyone,
We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects.
Core ideas
Type- and function specifications are const...
New
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps:
bureaucrat - which contains a bunch ...
New
Hello there,
I would like to share a feature toggles library (AKA feature flags) I’ve been working on.
The main package is FunWithFlags...
New
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs.
Generate and serve a JSON Open API ...
New
Presenting Aviacommerce, open source e-commerce platform in Elixir
Aviacommerce is an open source e-commerce platform in Elixir. We at...
New
Hi everyone,
I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
Experimenting with this code.
OK.try do
user <- fetch_user(1)
cart <- fetch_cart(1)
order = checkout(cart, user)
save_or...
New
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
For a good number of months I've been working on creating a very basic RTMP live video streaming server. Now that I have a very, very ba...
New
Other popular topics
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
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
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode.
The solution seems to be, in a hyphena...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch.
This project took far...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New







