<commit_before>'use strict';

// Gulp plugins
var gulp       = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var sass       = require('gulp-sass');
var minifyCss  = require('gulp-minify-css');
var postcss    = require('gulp-postcss');
// others
var autoprefix = require('autoprefixer');
var browserify = require('browserify');
var babelify   = require('babelify');
var source     = require('vinyl-source-stream');
var buffer     = require('vinyl-buffer');
var glob       = require('glob');

gulp.task('sass', () => {
  gulp.src('./resources/assets/sass/app.sass')
    .pipe(sourcemaps.init())
    .pipe(sass().on('error', sass.logError))
    .pipe(minifyCss())
    .pipe(postcss([ autoprefix({ browsers: ['last 2 versions'] }) ]))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('./public/css'));
});

gulp.task('script', () => {
  let scripts = glob.sync('./resources/assets/js/*.js');
  browserify({
    entries: scripts,
    debug: true
  })
  .transform(babelify)
  .bundle()
  .pipe(source('app.js'))
  .pipe(buffer())
  .pipe(sourcemaps.init({
    loadMaps: true
  }))
  .pipe(sourcemaps.write())
  .pipe(gulp.dest('./public/js'));
});

gulp.task('default', ['script']);<commit_msg>modify: add gulp watch<commit_after>'use strict';

// Gulp plugins
var gulp       = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var sass       = require('gulp-sass');
var minifyCss  = require('gulp-minify-css');
var postcss    = require('gulp-postcss');
// others
var autoprefix = require('autoprefixer');
var browserify = require('browserify');
var babelify   = require('babelify');
var source     = require('vinyl-source-stream');
var buffer     = require('vinyl-buffer');
var glob       = require('glob');

gulp.task('sass', () => {
  gulp.src('./resources/assets/sass/app.sass')
    .pipe(sourcemaps.init())
    .pipe(sass().on('error', sass.logError))
    .pipe(minifyCss())
    .pipe(postcss([ autoprefix({ browsers: ['last 2 versions'] }) ]))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('./public/css'));
});

gulp.task('script', () => {
  let scripts = glob.sync('./resources/assets/js/*.js');
  browserify({
    entries: scripts,
    debug: true
  })
  .transform(babelify)
  .bundle()
  .pipe(source('app.js'))
  .pipe(buffer())
  .pipe(sourcemaps.init({
    loadMaps: true
  }))
  .pipe(sourcemaps.write())
  .pipe(gulp.dest('./public/js'));
});

gulp.task('watch', () => {
  gulp.watch('./resources/assets/sass/**/*.sass', ['sass']);
  gulp.watch('./resources/assets/js/**/*.js');
});

gulp.task('default', ['script', 'sass']);
{'fraction_non_alphanumeric': 0.2203191903464383, 'fraction_numerical': 0.0007785130400934215, 'mean_word_length': 3.803738317757009, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '4393898', 'n_tokens_mistral': 907, 'n_tokens_neox': 898, 'n_words': 151}