<commit_before>
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
var LessPluginCleanCSS = require('less-plugin-clean-css');
var cleancss = new LessPluginCleanCSS({ advanced: true })

gulp.task('less', function() {
    return gulp.src('public/stylesheets/style.less')
        .pipe(plugins.less({
            plugins: [cleancss]
        }))
        .pipe(gulp.dest('public/stylesheets'));
});

gulp.task('rjs', function() {
    return gulp.src('public/javascripts/main.js')
        .pipe(plugins.rename('main.min.js'))
        .pipe(plugins.rjs({
            // name: 'main.min',
            baseUrl: 'public/javascripts/',
            mainConfigFile: 'public/javascripts/main.js'
        }))
        .pipe(gulp.dest('public/javascripts'));
});

gulp.task('default', ['less', 'rjs']);<commit_msg>Changed gulp task rjs to use gulp-shell plugin and r.js tool from requirejs<commit_after>
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
var LessPluginCleanCSS = require('less-plugin-clean-css');
var cleancss = new LessPluginCleanCSS({ advanced: true })

gulp.task('less', function() {
    return gulp.src('public/stylesheets/style.less')
        .pipe(plugins.less({
            plugins: [cleancss]
        }))
        .pipe(gulp.dest('public/stylesheets'));
});

gulp.task('rjs', plugins.shell.task([
    'r.js -o name=main \
             baseUrl=public/javascripts/ \
             mainConfigFile=public/javascripts/main.js \
             out=public/javascripts/main.min.js \
             preserveLicenseComments=false \
             findNestedDependencies=true \
             optimize=uglify2 \
             generateSourceMaps=true'
]));

gulp.task('default', ['less', 'rjs']);
{'fraction_non_alphanumeric': 0.16502605674580198, 'fraction_numerical': 0.0005790387955993051, 'mean_word_length': 2.857142857142857, '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': '4754894', 'n_tokens_mistral': 546, 'n_tokens_neox': 537, 'n_words': 90}