Problem with grunt-uncss

2

I would like to know if it is possible to read a .CSHTML file with grunt-uncss, because I searched and tried and so far I have not had any results.

    
asked by anonymous 21.10.2014 / 19:05

1 answer

1

As this comment on GitHub I was able to solve my problem the code looks like this: / p>

module.exports = function (grunt) {
    grunt.initConfig({
        uncss: {
            dist: {
                files: {
                    'Content/home.css': ['index.html']
                },
                options: {
                    urls: ['MinhaPagina/Home']
                }
            }
        }
    });

    // Load the plugins
    grunt.loadNpmTasks('grunt-uncss');

    // Default tasks.
    grunt.registerTask('uncss', ['uncss']);
};

EDIT : There must be an empty% void, which in my case is arquivo.html for the operation

    
22.10.2014 / 20:07