Using grunt-purifycss on a Windows OS

Abstract: This short howto explains how grunt uncss could be used to remove any unused css from your html files

Most websites use a big CSS file. This is often caused due to a default bootstrap or due to the reason that the file grow over the time due to multiple updates. Gunt uncss provided a way to remove any unused css content and will only leave the content in place which is needed. This example here will use grunt-purifycss.

Needed steps:

1.) Download Node.js (in that example I will use Node.js stable in the version 5.5.0) and install that on your Windows OS.

2.) Now create a folder on our C: drive called "grunt-css_project" (C:\grunt-css_project) or something similar which will work for you.

3.) Inside that folder create a Gruntfile.js file and two folders called "input" and "output"

4.) Copy the files which should be cleaned now into the input folder

5.) Edit the Gruntfile.js file and copy the following inside the file (and save it):