tailwind-starter icon indicating copy to clipboard operation
tailwind-starter copied to clipboard

Gulpfile needs to run css task on html change

Open rogerdawkins opened this issue 7 years ago • 2 comments

Hi, thanks for the starter kit, very handy to get to grips with Tailwind.

When I edit the index.html file and add something that would change the CSS, for example, on the container class I add bg-blue-lightest, when the browser is reloaded the background colour does not show. This seems to be because the html watch task only reloads the browser. Because the CSS has been purged it does not contain a definition for bg-blue-lightest so doesn't show.

The solution I used was to add

gulp.watch(paths.dist.base + "*.html", ["css"]);

before the existing html watch line.

Now when I change the index.html file it rebuilds the css file before reloading the browser.

rogerdawkins avatar Nov 22 '18 20:11 rogerdawkins

Thanks - this was giving me grief, works great now.

jules6120 avatar Jan 15 '19 08:01 jules6120

That could/should be proposed as a pull request.

AndiKod avatar Nov 05 '19 14:11 AndiKod