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

var browserify = require('browserify');
var buffer = require('vinyl-buffer');
var rename = require('gulp-rename');
var run = require('gulp-run');
var source = require('vinyl-source-stream');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var watchify = require('watchify');


var gutil = require('gulp-util');
var mocha = require('gulp-mocha');

var bundler = watchify(browserify({
  entries: ['./src/vl'],
  standalone: 'vl',
  debug: true
}));

// builds vegalite
function bundle() {
  return bundler
    .bundle()
    .pipe(source('vegalite.js'))
    .pipe(buffer())
    .pipe(gulp.dest('.'))
    .pipe(sourcemaps.init({loadMaps: true}))
    // This will minify and rename to vegalite.min.js
    .pipe(uglify())
    .pipe(rename({ extname: '.min.js' }))
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest('.'));
}

// generates spec.json
gulp.task('schema', function () {
  gulp.src('src/schemagen.js')
    .pipe(run('node', {silent: true, cwd: 'src'}))
    .pipe(rename("spec.json"))
    .pipe(gulp.dest('.'))
});

// watches for spec schema changes
gulp.task('watch-schema', function() {
    gulp.watch(['src/schema.js'], ['schema']);
});

// runs the tests
gulp.task('mocha', function() {
  return gulp.src(['test/*.spec.js'], { read: false })
    .pipe(mocha({ reporter: 'list' }))
    .on('error', gutil.log);
});

// watches directories and runs tests if things change
gulp.task('watch-mocha', function() {
  gulp.watch(['src/**', 'test/**'], ['mocha']);
});

bundler.on('update', bundle);

gulp.task('build', bundle);

gulp.task('default', ['build', 'watch-mocha', 'watch-schema']);<commit_msg>update schema path in gulpfile.js<commit_after>var gulp = require('gulp');

var browserify = require('browserify');
var buffer = require('vinyl-buffer');
var rename = require('gulp-rename');
var run = require('gulp-run');
var source = require('vinyl-source-stream');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var watchify = require('watchify');


var gutil = require('gulp-util');
var mocha = require('gulp-mocha');

var bundler = watchify(browserify({
  entries: ['./src/vl'],
  standalone: 'vl',
  debug: true
}));

// builds vegalite
function bundle() {
  return bundler
    .bundle()
    .pipe(source('vegalite.js'))
    .pipe(buffer())
    .pipe(gulp.dest('.'))
    .pipe(sourcemaps.init({loadMaps: true}))
    // This will minify and rename to vegalite.min.js
    .pipe(uglify())
    .pipe(rename({ extname: '.min.js' }))
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest('.'));
}

// generates spec.json
gulp.task('schema', function () {
  gulp.src('src/schema/schemagen.js')
    .pipe(run('node', {silent: true, cwd: 'src'}))
    .pipe(rename("spec.json"))
    .pipe(gulp.dest('.'));
});

// watches for spec schema changes
gulp.task('watch-schema', function() {
    gulp.watch(['src/schema/schema.js'], ['schema']);
});

// runs the tests
gulp.task('mocha', function() {
  return gulp.src(['test/*.spec.js'], { read: false })
    .pipe(mocha({ reporter: 'list' }))
    .on('error', gutil.log);
});

// watches directories and runs tests if things change
gulp.task('watch-mocha', function() {
  gulp.watch(['src/**', 'test/**'], ['mocha']);
});

bundler.on('update', bundle);

gulp.task('build', bundle);

gulp.task('default', ['build', 'watch-mocha', 'watch-schema']);
{'fraction_non_alphanumeric': 0.22307014969181096, 'fraction_numerical': 0.0, 'mean_word_length': 4.163636363636364, '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': '3541228', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1194, 'n_words': 249}