This is a simple Gulp setup for using Tailwind CSS that:
To get started, clone the project and install the dependencies:
# using npm
npm i
# Using Yarn
yarn
To start watching your JS /tailwind.js
and CSS src/styles.css
files for changes and automatically rebuild your tailwind stylesheet src/css/styles.css
, run:
npm run -s dev
And add this to the head of your HTML files.
<link rel="stylesheet" href="src/css/style.css">
To build a production bundle, run:
npm run -s prod
After that you will have a ready to deploy bundle at /dist
so change the link in head of your HTML files from src/
to dist/
like so:
<link rel="stylesheet" href="dist/css/style.css">