'gulp 3 gives excptionn when run rtl after sass

when running default task (sequence of 3 tasks sass then RTL then minify ) gulp gives exception with throw this error Unknown word

I use gulp 3 with gulp-sass, gulp-RTL, gulp-uglify when running default task I get an exception and tried many things but no result

Error

de_modules\postcss\lib\lazy-result.js:248
        if (this.error) throw this.error;
                        ^
CssSyntaxError: <css input>:4363:3: Unknown word
    at Input.error (..\node_modules\postcss\lib\input.js:119:22)
    at Parser.unknownWord (..\node_modules\postcss\lib\parser.js:506:26)
    at Parser.other (..\node_modules\postcss\lib\parser.js:171:18)
    at Parser.parse (..\node_modules\postcss\lib\parser.js:84:26)
    at parse (..\node_modules\postcss\lib\parse.js:24:16)
    at new LazyResult (..\node_modules\postcss\lib\lazy-result.js:70:24)
    at Processor.process (..\node_modules\postcss\lib\processor.js:117:12)
    at DestroyableTransform._transform (..\node_modules\gulp-rtlcss\index.js:26:47)
    at DestroyableTransform.Transform._read (..\node_modules\readable-stream\lib\_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (..\node_modules\readable-stream\lib\_stream_transform.js:172:83)

guplfile.js

var gulp = require('gulp');
var sass = require('gulp-sass');
var minifyCss = require("gulp-minify-css");
var uglify = require("gulp-uglify");
var rtlcss = require("gulp-rtlcss");
var runSeq = require('run-sequence');
var gulpIf = require('gulp-if');

gulp.task('sass_plugins', function () {
    var tasks = [];
    tasks.push(sass_plugins());
    return tasks;
});

gulp.task('minify_plugins', function () {
    // minify 
    var tasks = [];
    tasks.push(minify_plugins());
    return tasks;
});

gulp.task('rtl_plugins', function () {
    var tasks = [];
    tasks.push(rtl_plugins());
    return tasks;
});

var sass_plugins = function () {
    var tasks = [];
    // bootstrap compilation
    tasks.push(
        gulp
        .src('./assets/src/sass/bootstrap.scss')
        .pipe(sass())
        .pipe(gulp.dest('./assets/dist/global/plugins/bootstrap/css'))
        );
    // select2 compilation using bootstrap variables
    tasks.push(gulp
        .src('./assets/plugins/select2/sass/select2-bootstrap.min.scss')
        .pipe(sass({ outputStyle: 'compressed' }))
        .pipe(gulp.dest('./assets/dist/global/plugins/select2/css'))
        );
    return tasks;
};

var minify_plugins = function () {
    // css minify plugins
    var tasks = [];
    tasks.push(gulp
        .src(['./assets/dist/global/plugins/bootstrap/css/*.css', '!./assets/dist/global/plugins/bootstrap/css/*.min.css'])
        .pipe(minifyCss())
        .pipe(rename({ suffix: '.min' }))
        .pipe(gulp.dest('./assets/dist/global/plugins/bootstrap/css')));
    tasks.push(gulp
        .src(['./assets/dist/global/plugins/select2/css/*.css', '!./assets/dist/global/plugins/select2/css/*.min.css'])
        .pipe(minifyCss())
        .pipe(rename({ suffix: '.min' }))
        .pipe(gulp.dest('./assets/dist/global/plugins/select2/css')));
    return tasks;
};
gulp.task('default', function (cb) {
    runSeq('sass_plugins', 'rtl_plugins', 'minify_plugins', cb);
});

i want to make default task to run the 3 tasks, please help when run each task seperatly it run fines



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source