I was introduced to Node.js today and built a very simple Hello, World app. I also started using grunt to automate builds and deployments.
I am using the Bootstrap framework and colors.css.
<div class="hello"><h1>Hello, World</h1></div>
I add a few color classes to some elements using jQuery.
console.log('dev mode');
$('.hello').addClass('bg-blue');
I run the code through grunt-uncss.
uncss: {
dist: {
files: {
'dist/styles.min.css': 'index.html'
}
}
}
But none of the color classes including bg-blue
are there in styles.min.css
.
If I don't run the file through uncss, everything works as expected.
What am I doing wrong?