<commit_before>'use strict';

const del      = require('del'),
    depcheck   = require('depcheck'),
    g          = require('gulp-load-plugins')(),
    gulp       = require('gulp'),
    license    = require('./lib/license'),
    rules      = require('@edjboston/eslint-rules');


// Clean the build dir
gulp.task('clean', () => {
    return del([
        'dist/**',
        '!dist'
    ]);
});


// JavaScript
gulp.task('scripts', () => {
    return gulp.src('src/js/*.js')
        .pipe(g.sourcemaps.init({ loadMaps : true }))
        .pipe(g.babel({
            presets  : [ 'es2015' ],
            comments : true,
            compact  : false
        }))
        .pipe(g.concat('simple-mesh.min.js'))
        .pipe(g.tap(file => {
            file.contents = Buffer.concat([ new Buffer(license), file.contents ]);
        }))
        .pipe(g.uglify({ output : { comments : /^!/ } }))
        .pipe(g.sourcemaps.write('.'))
        .pipe(gulp.dest('dist'));
});


// Lint all JS files (including this one)
gulp.task('lint', () => {
    const globs = [
        'gulpfile.js',
        'src/*.js',
        'test/*.js',
        '!node_modules/**'
    ];

    return gulp.src(globs)
        .pipe(g.eslint({
            extends       : 'eslint:recommended',
            parserOptions : { 'ecmaVersion' : 6 },
            rules
        }))
        .pipe(g.eslint.format());<commit_msg>Linting JS contents of /lib<commit_after>'use strict';

const del      = require('del'),
    depcheck   = require('depcheck'),
    g          = require('gulp-load-plugins')(),
    gulp       = require('gulp'),
    license    = require('./lib/license'),
    rules      = require('@edjboston/eslint-rules');


// Clean the build dir
gulp.task('clean', () => {
    return del([
        'dist/**',
        '!dist'
    ]);
});


// JavaScript
gulp.task('scripts', () => {
    return gulp.src('src/js/*.js')
        .pipe(g.sourcemaps.init({ loadMaps : true }))
        .pipe(g.babel({
            presets  : [ 'es2015' ],
            comments : true,
            compact  : false
        }))
        .pipe(g.concat('simple-mesh.min.js'))
        .pipe(g.tap(file => {
            file.contents = Buffer.concat([ new Buffer(license), file.contents ]);
        }))
        .pipe(g.uglify({ output : { comments : /^!/ } }))
        .pipe(g.sourcemaps.write('.'))
        .pipe(gulp.dest('dist'));
});


// Lint all JS files (including this one)
gulp.task('lint', () => {
    const globs = [
        'gulpfile.js',
        'src/*.js',
        'lib/*.js',
        'test/*.js',
        '!node_modules/**'
    ];

    return gulp.src(globs)
        .pipe(g.eslint({
            extends       : 'eslint:recommended',
            parserOptions : { 'ecmaVersion' : 6 },
            rules
        }))
        .pipe(g.eslint.format());
{'fraction_non_alphanumeric': 0.19593147751605997, 'fraction_numerical': 0.0035688793718772305, 'mean_word_length': 1.7670286278381047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7264794', 'n_tokens_mistral': 940, 'n_tokens_neox': 911, 'n_words': 152}