t3dotgg / 1app5stacks

Theo built the same app 5 times because he's dumb
MIT License
75 stars 25 forks source link

[rails-version] Running bin/dev is required for Tailwind #8

Open testa19 opened 3 days ago

testa19 commented 3 days ago

Note: Running bin/dev is required for Tailwind CSS to work properly.

Not exactly.

You need your tailwind assets to be built and updated somehow. So you need for rails tailwindcss:watch to run.

And then you can have your rails s run separately.

bin/dev is just a way to combine those in one command using foreman (and you need foreman to be installed for that).

It is unfortunate Tailwind docs do not tell that: just use that tool. And not showing the real command so a dev needs to dig it out of script and foreman procfile.

Personally, i dont use such scripts locally (in dev). I like to run JS/assets and rails server separately as in heavy projects restarting the whole thing (building JS, rails server) when you need to reboot only one of them takes too much time.