Open RadValentin opened 10 years ago
I've been thinking about this and maybe you could add sourcemap support another way. Postcss supports sourcemaps maybe you could add in an extra parameter that would enable sourcemap preservation/generation. Then you'd call the plugin like this:
var transformSelectors = require("gulp-transform-selectors");
gulp.src("./src/*.css")
.pipe(transformSelectors(function (selector) {
return '.ie8 ' + selector;
}, {
splitOnCommas: true,
postcss: {
map: true,
from: 'style.css',
to: 'style.css'
}
}))
.pipe(gulp.dest("./dist"));
What do you think?
I'm trying to prefix my selectors with this plugin and have sourcemaps generated by
gulp-sourcemaps
but the problem is that your plugin is changing the way my css is written by removing whitespaces. Someting like this (withsplitOnCommas: true
):is rendered out as
This in turn messes things up because the sourcemap plugin doesn't account for this change. So can you please add support for
gulp-sourcemaps
? Info on how to do this can be found here.