Skip to content

Gulpfile needs to run css task on html change #5

@rogerdawkins

Description

@rogerdawkins

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions