Skip to content

Instantly share code, notes, and snippets.

@rririanto
Created March 5, 2021 17:28
Show Gist options
  • Save rririanto/93217abb7073a62a2772f52291348238 to your computer and use it in GitHub Desktop.
Save rririanto/93217abb7073a62a2772f52291348238 to your computer and use it in GitHub Desktop.
Gruntfile.js with gzip
module.exports = function(grunt) {
grunt.initConfig({
uncss: {
dist: {
files: [{
nonull: true,
src: ['http://localhost:8000/'],
dest: 'apps/static/css/styles.css'
}]
},
options: {
ignoreSheets : [/fonts.googleapis/, /cdn.jsdelivr.net/],
stylesheets: ['/static/styles/styles.css'],
report: 'gzip'
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-uncss');
// Default tasks.
grunt.registerTask('default', ['uncss']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment