<commit_before>import gulp                     from 'gulp'
import livereload               from 'gulp-livereload'
import gutil                    from 'gulp-util'
import webpack                  from 'webpack'
import webpackStream            from 'webpack-stream'
import ExtractTextPlugin        from 'extract-text-webpack-plugin'
import OptimizeCssAssetsPlugin  from 'optimize-css-assets-webpack-plugin'

const PRODUCTION = process.argv.indexOf('--production') > -1

gulp.task('build', build)
gulp.task('watch', watch)
gulp.task('default', ['watch'])

function build() {
  return compile(getWebpackBaseConfig())
}

function watch() {
  livereload.listen()

  gulp.watch('scripts/skoorin.js', (evt) =>
    livereload.changed(evt.path)
  )

  return compile({
    ...getWebpackBaseConfig(),
    watch: true
  })
}

function compile(config) {<commit_msg>properly watch all types of files and reload<commit_after>import gulp                     from 'gulp'
import livereload               from 'gulp-livereload'
import gutil                    from 'gulp-util'
import webpack                  from 'webpack'
import webpackStream            from 'webpack-stream'
import ExtractTextPlugin        from 'extract-text-webpack-plugin'
import OptimizeCssAssetsPlugin  from 'optimize-css-assets-webpack-plugin'

const PRODUCTION = process.argv.indexOf('--production') > -1

gulp.task('build', build)
gulp.task('watch', watch)
gulp.task('default', ['watch'])

function build() {
  return compile(getWebpackBaseConfig())
}

function watch() {
  livereload.listen()

  gulp.watch(['scripts/**/*.js', 'styles/**/*.css', '**/*.php'], (evt) =>
    livereload.changed(evt.path)
  )

  return compile({
    ...getWebpackBaseConfig(),
    watch: true
  })
}

function compile(config) {
{'fraction_non_alphanumeric': 0.1320113314447592, 'fraction_numerical': 0.0011331444759206798, 'mean_word_length': 3.0319634703196345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6092881', 'n_tokens_mistral': 542, 'n_tokens_neox': 521, 'n_words': 119}