This template can be used as a starting point if you want to use Tailwind CSS v3 for a plain HTML (or Javascript) project.
The input.css
is located in ./src. The generated CSS is located in output.css
. The index.html
has a link to this output.css
, so you are good to start - after you run npm install
.
npm run build
generates the output.css (one time) this command must be run after each change in one of the html or js files, where an additional tailwind class is used.
npm run watch
can be used to avoid the manual step after a change of the files. It runs the generation in watch mode, which means that tailwind automatically runs the generation of output.css if you of the files (html, js) are changed (as long as you stop this script).