simonswiss / tailwind-starter

A starter kit to get going with tailwind, gulp and browser-sync.
96 stars 11 forks source link

Gulpfile needs to run css task on html change #5

Open rogerdawkins opened 5 years ago

rogerdawkins commented 5 years ago

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.

jules6120 commented 5 years ago

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

AndiKod commented 4 years ago

That could/should be proposed as a pull request.