Now updated with the Tailwind JIT compiler mode
With the (new highly efficient) Tailwind JIT compiler, purging of unused styles takes place both in development and production.
Setup and activate a virtual python environment before proceeding.
Clone the repository onto your local computer and run:
pip install -r requirements.txt
to install flask packagesnpm install
to install npm packages from package.json
npm run dev
to run Tailwind in JIT watch mode during development - this will start real time compilation of styles used in your HTML templatespython run.py
to start the Flask development server (debug mode is ON). As you add/remove Tailwind classes in HTML templates, the watcher running in step 3 will automatically regenerate your app\static\main.css
file which is picked up the flask server running in step 4.npm run build:prod
to prepare CSS build ready for productionEnjoy!