<commit_before>import gulp from 'gulp';
import Elixir from 'laravel-elixir';
import postcss from 'gulp-postcss';
import sass from 'gulp-sass';
import rtlcss from 'rtlcss';

class RTLTask extends Elixir.Task {
    /**
     * Create a new RTLTask instance.
     *
     * @param {string}      name
     * @param {GulpPaths}   paths
     * @param {object|null} options
     */
    constructor(name, paths, options) {
        super(name, null, paths);

        this.options = options;
    }


    /**
     * Build the Gulp task.
     */
    gulpTask() {
        return (
            gulp
            .src(this.src.path)
            .pipe(this.initSourceMaps())
            .pipe(this.sass())
            .on('error', this.onError())
            .pipe(this.rtl())
            .on('error', this.onError())
            .pipe(this.autoPrefix())
            .pipe(this.concat())
            .pipe(this.minify())
            .on('error', this.onError())
            .pipe(this.writeSourceMaps())
            .pipe(this.saveAs(gulp))
            .pipe(this.onSuccess())
        );
    }

    /**
     * Register file watchers.
     */
    registerWatchers() {
        this.watch(this.src.baseDir + Elixir.config.css[this.name].search)
            .ignore(this.output.path);
    }

    /**
     * Compile the SASS.
     */
    sass() {
        this.recordStep('Starting ' + this.ucName());
        return sass();
    }

    /**
     * RTL the CSS.
     */
    rtl() {
        return postcss([rtlcss]);<commit_msg>added compile function<commit_after>import gulp from 'gulp';
import Elixir from 'laravel-elixir';
import postcss from 'gulp-postcss';
import rtlcss from 'rtlcss';

class RTLTask extends Elixir.Task {
    /**
     * Create a new RTLTask instance.
     *
     * @param {string}      name
     * @param {GulpPaths}   paths
     * @param {object|null} options
     */
    constructor(name, paths, options) {
        super(name, null, paths);

        this.options = options;
    }


    /**
     * Build the Gulp task.
     */
    gulpTask() {
        return (
            gulp
            .src(this.src.path)
            .pipe(this.initSourceMaps())
            .pipe(this.compile())
            .on('error', this.onError())
            .pipe(this.rtl())
            .on('error', this.onError())
            .pipe(this.autoPrefix())
            .pipe(this.concat())
            .pipe(this.minify())
            .on('error', this.onError())
            .pipe(this.writeSourceMaps())
            .pipe(this.saveAs(gulp))
            .pipe(this.onSuccess())
        );
    }

    /**
     * Register file watchers.
     */
    registerWatchers() {
        this.watch(this.src.baseDir + Elixir.config.css[this.name].search)
            .ignore(this.output.path);
    }

    /**
     * Compile the SASS.
     */
    compile() {
        this.recordStep('Compiling ' + this.ucName());

        let plugin = Elixir.Plugins.sass ||
                     Elixir.config.css[this.name].plugin;

        return plugin(
            this.options || Elixir.config.css[this.name].pluginOptions
        );
    }

    /**
     * RTL the CSS.
     */
    rtl() {
        return postcss([rtlcss]);
{'fraction_non_alphanumeric': 0.1478562421185372, 'fraction_numerical': 0.0, 'mean_word_length': 1.6353820598006645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4389776', 'n_tokens_mistral': 1017, 'n_tokens_neox': 992, 'n_words': 183}