<commit_before>const gulp = require('gulp');

const browserSync = require('browser-sync').create();
const clean = require('gulp-clean');
const nunjucks = require('gulp-nunjucks-render');
const pump = require('pump');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const uglify = require('gulp-uglify');

// Static server
gulp.task('serve', function () {
  browserSync.init({
    server: {
      baseDir: "./_build"
    }
  });
});

// Sass to CSS compilation
gulp.task('sass', function() {
  return gulp.src("source/styles/**/*.scss")
    .pipe(sourcemaps.init())
    .pipe(sass().on('error', sass.logError))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest("_build/styles"))
    .pipe(browserSync.stream());
});

// Templates compilation
gulp.task('templates', function() {
  // Gets .tpl  files in pages
  return gulp.src('source/pages/*.tpl')
    // Renders templates from source/templates with nunjucks.
    .pipe(nunjucks({
      path: ['source/templates']
    }))
    .pipe(gulp.dest('_build'))
});

// basic scripts tasks.
gulp.task('scripts', function(cb) {
  pump([
    gulp.src('source/scripts/*.js'),
    uglify(),
    gulp.dest('_build/scripts')
  ],
    cb
  );
});

gulp.task('copy', ['clean'], function() {
  return gulp.src(['source/assets/**/*'], {
    base: 'source'
  }).pipe(gulp.dest('_build'));
});

gulp.task('clean', function() {
  return gulp.src('_build/assets', {read: false})
      .pipe(clean());
});

gulp.task('watch', function() {
  gulp.watch('source/styles/**/*.scss', ['sass']);
  gulp.watch(['source/pages/**/*.tpl','source/templates**/*.tpl'], ['templates']);
  gulp.watch('source/scripts/**/*.js', ['scripts']);
  gulp.watch('source/assets/**', ['copy']);
});

gulp.task('default', [
  'sass',
  'templates',
  'scripts',
  'copy',
  'serve',
  'watch'
]);<commit_msg>🍹 Updates gulp watcher<commit_after>const gulp = require('gulp');

const browserSync = require('browser-sync').create();
const clean = require('gulp-clean');
const nunjucks = require('gulp-nunjucks-render');
const pump = require('pump');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const uglify = require('gulp-uglify');

// Static server
gulp.task('serve', function () {
  browserSync.init({
    server: {
      baseDir: "./_build"
    }
  });
});

// Sass to CSS compilation
gulp.task('sass', function() {
  return gulp.src("source/styles/**/*.scss")
    .pipe(sourcemaps.init())
    .pipe(sass().on('error', sass.logError))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest("_build/styles"))
    .pipe(browserSync.stream());
});

// Templates compilation
gulp.task('templates', function() {
  // Gets .tpl  files in pages
  return gulp.src('source/pages/*.tpl')
    // Renders templates from source/templates with nunjucks.
    .pipe(nunjucks({
      path: ['source/templates']
    }))
    .pipe(gulp.dest('_build'))
});

// basic scripts tasks.
gulp.task('scripts', function(cb) {
  pump([
    gulp.src('source/scripts/*.js'),
    uglify(),
    gulp.dest('_build/scripts')
  ],
    cb
  );
});

gulp.task('copy', ['clean'], function() {
  return gulp.src(['source/assets/**/*'], {
    base: 'source'
  }).pipe(gulp.dest('_build'));
});

gulp.task('clean', function() {
  return gulp.src('_build/assets', {read: false})
      .pipe(clean());
});

gulp.task('watch', function() {
  gulp.watch('source/styles/**/*.scss', ['sass']);
  gulp.watch([
    'source/pages/**/*.tpl',
    'source/templates/**/*.tpl'], ['templates']);
  gulp.watch([
    '_build/**/*.{html,js}'])
    .on('change', browserSync.reload);
  gulp.watch('source/scripts/**/*.js', ['scripts'])
  gulp.watch('source/assets/**', ['copy']);
});

gulp.task('default', [
  'sass',
  'templates',
  'scripts',
  'copy',
  'serve',
  'watch'
]);
{'fraction_non_alphanumeric': 0.23369421705835755, 'fraction_numerical': 0.0, 'mean_word_length': 3.8132147395171536, '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': '444590', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1348, 'n_words': 227}