nDmitry / grunt-autoprefixer

Parse CSS and add vendor-prefixed CSS properties using the Can I Use database. Based on Autoprefixer.
MIT License
795 stars 60 forks source link

Issues with configuration and concatenation #1

Closed theDustRoom closed 11 years ago

theDustRoom commented 11 years ago

In my gruntFile.js if I include:

autoprefixer: {
            options: {
                browsers: ["last 2 versions", "> 1%", "ie 8", "ie 7"]
            },
files: {
            "css/mycss_prefixed.css": ["css/mycss_1.css", "css/mycss_2.css"]
}
        }

It doesn't work but if I include this it does:

autoprefixer: {
            options: {
                browsers: ["last 2 versions", "> 1%", "ie 8", "ie 7"]
            },
            "css/mycss_prefixed.css": ["css/mycss_1.css", "css/mycss_2.css"]
        }

Also; the inbuilt CSS concatenation injects a comma as a separator - can this be removed?

nDmitry commented 11 years ago

About the first issue: you should add one more level (target) to your task config according to Grunt documentation (e.g. dist):

autoprefixer: {
    dist: {
        options: {
            browsers: ["last 2 versions", "> 1%", "ie 8", "ie 7"]
        },
        files: {
            "css/mycss_prefixed.css": ["css/mycss_1.css", "css/mycss_2.css"]
        }
    }
}