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

Change reference to file in the sourcemap #63

Closed danyeah closed 10 years ago

danyeah commented 10 years ago

Hello Currently my autoprefixer task (im using grunt) takes in input "main.temp.css" which is generated by sass...and outputs "main.css" and "main.css.map" the issue is that since the sourcemap references "main.temp.css" it is useless because the filename is different from what devtools expects.

Is there any way i can change this behaviour? I've tried using the map options but with no luck.

        autoprefixer: {
            options: {
                browsers: [
                    'last 4 version',
                    'Firefox ESR',
                    'Opera 12.1',
                    '> 1%',
                    'ie 8',
                    'ie 7'
                ],
                map: {
                    prev: 'css/',
                    annotation: 'css/main.css.map',
                    //sourceContent: true
                },
            },
            dev: {
                src: '<%= ground.cssFileTemp %>',
                dest: '<%= ground.cssFileTemp %>'
            },
        },
nDmitry commented 10 years ago
autoprefixer: {
    options: {
        map: true
    },
    dev: {
        src: 'css/main.temp.css',
        dest: 'css/main.css' // -> main.css, main.css.map
    }
}