jjlharrison / gulp-rtlcss

Gulp plugin that uses RTLCSS to convert LTR CSS to RTL.
MIT License
36 stars 7 forks source link

Better documentation for keeping both original and RTL styles #1

Closed Strajk closed 9 years ago

Strajk commented 9 years ago

Hi, first of all, thanks for great job...

I struggled a little bit with configuration for keeping original file generating rtl version next to it. Maybe would be helpful for others to include it in README.

var rename = require('gulp-rename');
var rtlcss = require('gulp-rtlcss');

gulp.task("styles", function (event) {
    return gulp.src("/styles/**.css")
        // process: e.g. pipe(autoprefixer({}))
        .pipe(gulp.dest(".tmp/styles/"))
        .pipe(rename(function (path) {
            path.basename += ".rtl";
        }))
        .pipe(rtlcss())
        .pipe(gulp.dest(".tmp/styles/"));
});
jjlharrison commented 9 years ago

Thanks for your suggestion. I've added a real-world example to the README.

Strajk commented 9 years ago

@jjlharrison awesome, thanks! :)