<commit_before>'use strict';

var gulp    = require('gulp');
var config  = require('../config');
var helpers = require('../helpers');
var browserSync = require('browser-sync');



gulp.task('build', gulp.series(
  'main:static',
  'main:styles',
  'main:scripts',
  'vendor:styles',
  'vendor:fonts',
  'vendor:scripts',
  <% if(markupIntegration=='jekyll'){ %>
  'jekyll:build',
  <% } else { %>
  'main:markup',
  <% } %>
))

function reload(done) {
  browserSync.reload()
  done()
}

gulp.task('browser-sync', () => {
  return browserSync.init({
    server : {
      baseDir : config.directorie.dist.base,
      serveStaticOptions : {
        extensions : ['html']
      }
    },
    open : false,
    logConnections : true
  })
})

gulp.task('watch', done => {
  // Detect changes on the config file
  gulp.watch('<%= paths.src.gulp %>/config.js', gulp.series('default', reload))
  
  //static files
  <% if(markupIntegration=='jekyll'){ %>
      gulp.watch('<%= paths.src.markup %>/**/*.html', gulp.series('jekyll:rebuild', reload));
    <% } else { %>
      gulp.watch('<%= paths.src.markup %>/**/*.<%=markupLanguage%>', ['main:markup']);
  <% } %>

  gulp.watch('<%= paths.src.images %>/**/*', ['main:images']);
  gulp.watch('<%= paths.src.fonts %>/**/*', ['main:fonts']);
  gulp.watch('<%= paths.src.icons %>/**/*', ['main:icons']);

  //scripts
  gulp.watch('<%= paths.src.scripts %>/**/*.js', ['main:scripts']);

  //styles
  gulp.watch([
    '<%= paths.src.styles %>/**/*.<%=cssProcessor%>',
    '!<%= paths.src.frontendframework %>/**/*',
  ], ['main:styles']);

  <% if (frontEndFramework) { %>gulp.watch('<%= paths.src.frontendframework %>/**/**.scss', ['vendor:<%=frontEndFramework%>:styles']);
  gulp.watch('<%= paths.src.frontendframework %>/**/**.js', ['vendor:<%=frontEndFramework%>:scripts']);
  gulp.watch('<%= paths.src.frontendframework %>/**/fonts/**/*', ['vendor:<%=frontEndFramework%>:fonts']);<% } %>
  done()
})

gulp.task('serve', gulp.parallel('browserSync', , 'serve''watch'))

gulp.task('release', gulp.series('build', 'zip'))

gulp.task('default', gulp.series('build', 'serve'))<commit_msg>watch tasks inside the default file<commit_after>'use strict';

var gulp    = require('gulp');
var config  = require('../config');
var helpers = require('../helpers');
var browserSync = require('browser-sync');



gulp.task('build', gulp.series(
  'main:static',
  'main:styles',
  'main:scripts',
  'vendor:styles',
  'vendor:fonts',
  'vendor:scripts',
  <% if(markupIntegration=='jekyll'){ %>
  'jekyll:build',
  <% } else { %>
  'main:markup',
  <% } %>
))

function reload(done) {
  browserSync.reload()
  done()
}

gulp.task('browser-sync', () => {
  return browserSync.init({
    server : {
      baseDir : config.directorie.dist.base,
      serveStaticOptions : {
        extensions : ['html']
      }
    },
    open : false,
    logConnections : true
  })
})

gulp.task('watch', done => {
  // Detect changes on the config file
  gulp.watch('<%= paths.src.gulp %>/config.js', gulp.series('default', reload))

  //static files
  <% if(markupIntegration=='jekyll'){ %>
      gulp.watch('<%= paths.src.markup %>/**/*.html', gulp.series('jekyll:rebuild', reload));
    <% } else { %>
      gulp.watch('<%= paths.src.markup %>/**/*.<%=markupLanguage%>', ['main:markup']);
  <% } %>

  gulp.watch('<%= paths.src.images %>/**/*', gulp.series( 'main:images', reload ));
  gulp.watch('<%= paths.src.fonts %>/**/*', gulp.series( 'main:fonts', reload ));
  gulp.watch('<%= paths.src.icons %>/**/*', gulp.series( 'main:icons', reload ));

  //scripts
  gulp.watch('<%= paths.src.scripts %>/**/*.js', gulp.series( 'main:scripts', reload ));

  //styles
  gulp.watch([
    '<%= paths.src.styles %>/**/*.<%=cssProcessor%>',
    '!<%= paths.src.frontendframework %>/**/*',
  ], gulp.series( 'main:styles', reload ));

  // wat
  <% if (frontEndFramework) { %>
    gulp.watch('<%= paths.src.frontendframework %>/**/**.scss', gulp.series( 'vendor:<%=frontEndFramework%>:styles', reload ));
    gulp.watch('<%= paths.src.frontendframework %>/**/**.js', gulp.series( 'vendor:<%=frontEndFramework%>:scripts', reload ));
    gulp.watch('<%= paths.src.frontendframework %>/**/fonts/**/*', gulp.series( 'vendor:<%=frontEndFramework%>:fonts', reload ));
  <% } %>
  done()
})

gulp.task('serve', gulp.parallel('browserSync', , 'serve''watch'))

gulp.task('release', gulp.series('build', 'zip'))

gulp.task('default', gulp.series('build', 'serve'))
{'fraction_non_alphanumeric': 0.2590347923681257, 'fraction_numerical': 0.0, 'mean_word_length': 3.995515695067265, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 57, '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': '7301630', 'n_tokens_mistral': 1665, 'n_tokens_neox': 1549, 'n_words': 247}