<commit_before>var gulp         = require('gulp');
var less         = require('gulp-less');
var sourcemaps   = require('gulp-sourcemaps');
var minifyCSS    = require('gulp-minify-css');
var handleErrors = require('../util/handleErrors');
var config       = require('../config').less;
var reload       = require('../util/bs').reload;
var autoprefixer = require('gulp-autoprefixer');
var handleErrors = require('../util/handleErrors');

function doLess() {
  return gulp.src(config.src)
    .pipe(sourcemaps.init())
    .pipe(less(config.settings))
    .on('error', handleErrors)
    .pipe(autoprefixer(config.autoprefixer))
    .pipe(minifyCSS())
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest(config.dest))
    .pipe(reload({stream:true}));
};

gulp.task('less', doLess);

gulp.task('less-all', ['sprite', 'iconFont'], doLess);<commit_msg>Prevent full page reload on less compilation<commit_after>var gulp         = require('gulp');
var less         = require('gulp-less');
var sourcemaps   = require('gulp-sourcemaps');
var minifyCSS    = require('gulp-minify-css');
var handleErrors = require('../util/handleErrors');
var config       = require('../config').less;
var stream       = require('../util/bs').stream;
var autoprefixer = require('gulp-autoprefixer');
var handleErrors = require('../util/handleErrors');

function doLess() {
  return gulp.src(config.src)
    .pipe(sourcemaps.init())
    .pipe(less(config.settings))
    .on('error', handleErrors)
    .pipe(autoprefixer(config.autoprefixer))
    .pipe(minifyCSS())
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest(config.dest))
    .pipe(stream({match: '**/*.css'}));
};

gulp.task('less', doLess);

gulp.task('less-all', ['sprite', 'iconFont'], doLess);
{'fraction_non_alphanumeric': 0.19606709080393292, 'fraction_numerical': 0.0, 'mean_word_length': 3.971264367816092, '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': '7013629', 'n_tokens_mistral': 572, 'n_tokens_neox': 578, 'n_words': 98}