olivetree Posted yesterday at 04:19 PM Share Posted yesterday at 04:19 PM Hi How to use site-rockfrontend tailwind css with site-rockend without having npm to gerate tailwindcss on a external webhoster? Just install the site-profile does not solve this, I suppose. I understood that npm is needed to generate the tailwind.css on a local dev box and put that then up to the external site. That makes sense. I just want to understand how to use tailwindcss in that combination without having npm locally and on the external site? Is that possible? Link to comment Share on other sites More sharing options...
bernhard Posted 3 hours ago Share Posted 3 hours ago Hey @olivetree my site profile uses NPM to install tailwind and tailwind is used for all the utility classes like "mt-5" or "py-2" etc.; Whenever you run "npm run build" this process is started and it creates a css file that you can then load on your webpage. In my profile this is usually done whenever a file changes (from /site/livereload.php). If you don't modify your markup on your production system this file will never ever change, so you can just upload that file and that's all you have to do. If you don't need to recompile the file you don't need npm on the remote server. 1 Link to comment Share on other sites More sharing options...
olivetree Posted 3 hours ago Author Share Posted 3 hours ago (edited) Many thanks @bernhard. Now I understand the mechanism behind. I didnt realized that this way changes are collected and rebuild into tailwinds css file(s). Edited 3 hours ago by olivetree grammatical adjustment 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted 33 minutes ago Share Posted 33 minutes ago In case you really need to build tailwindcss without node and running npm install for whatever reason you can use this https://tailwindcss.com/blog/standalone-cli. Just download a binary, put it somewhere and call with proper arguments. To make it easy in VS Code create a task. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now