<commit_before>const gulp = require('gulp')
const rename = require('gulp-rename')
const browserSync = require('browser-sync')

const webpack = require('webpack')
const webpackStream = require('webpack-stream')
const configDev = require('../webpack.config.dev.js')
const configDist = require('../webpack.config.dist.js')

const srcEntry = 'src/js/entry.js'
const srcCritical = 'src/js/critical.js'

gulp.task('js-dev', () => {
	return gulp.src(srcEntry)
		.pipe(webpackStream(configDev, webpack, (error, stats) => {
			const time = stats.toJson().time
			console.log(`Built in ${time} ms.`)
		}))
		.pipe(rename('bundle.js'))<commit_msg>report error js<commit_after>const gulp = require('gulp')
const rename = require('gulp-rename')
const browserSync = require('browser-sync')
const plumber = require('gulp-plumber')
const webpack = require('webpack')
const webpackStream = require('webpack-stream')
const configDev = require('../webpack.config.dev.js')
const configDist = require('../webpack.config.dist.js')
const report = require('../report-error.js')

const srcEntry = 'src/js/entry.js'
const srcCritical = 'src/js/critical.js'

gulp.task('js-dev', () => {
	return gulp.src(srcEntry)
		.pipe(plumber({ errorHandler: report }))
		.pipe(webpackStream(configDev, webpack, (error, stats) => {
			const time = stats.toJson().time
			console.log(`Built in ${time} ms.`)
		}))
		.pipe(rename('bundle.js'))
{'fraction_non_alphanumeric': 0.1812990720913633, 'fraction_numerical': 0.0, 'mean_word_length': 5.06926406926407, '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': '181542', 'n_tokens_mistral': 479, 'n_tokens_neox': 459, 'n_words': 94}