Home

Awesome

grunt-uncss-angular-example

Build Status

An example of grunt-uncss with AngularJs.

Grunt-uncss plugin configuration:

    ...
    uncss:{
      dist:{
        files:{
          'dist/styles/tidy.css' : ['app/index.html']
        }
      }
    },
    ...

where it's wired up in the build task:

...
  grunt.registerTask('build', [
    'clean:dist',
    'bowerInstall',
    'useminPrepare',
    'concurrent:dist',
    'autoprefixer',
    'concat',
    'ngmin',
    'copy:dist',
    'cssmin',
    'uglify',
    'rev',
    'usemin',
    'htmlmin',
    'uncss'
  ]);
  ...

Note: I needed to run

git config --global url."https://".insteadOf git://

in order to fix an error that "bower install" was throwing.