<commit_before>var DIST_DIR = 'dist',
    SRC_FILES = 'src/**/*.js',

    path = require('path'),

    date = require('moment'),
    del = require('del'),
    karma = require('karma').server,

    runSequence = require('run-sequence'),

    gulp = require('gulp'),
    $ = require('gulp-load-plugins')(),
    
    banner = [
        '/*!',
        ' * <%= package.title || package.name %> :: v<%= package.version %> :: <%= package.todayDate  %>',
        ' * web: <%= package.homepage %>',
        ' *',
        ' * Copyright (c) <%= package.todayYear %> | <%= package.author %>',
        ' * License: <%= package.license %>',
        ' */',
        ''
        ].join('\n'),

    pkg = require('./package.json');

pkg.todayDate = date().format('YYYY-MM-DD');
pkg.todayYear = date().format('YYYY');

gulp.task('clean', function(done) {
    del(DIST_DIR, done);
});

gulp.task('scripts', function() {
    var filename = pkg.name + '.js';

    return gulp.src(SRC_FILES)
        .pipe($.newer(path.join(DIST_DIR, filename)))
        .pipe($.angularFilesort())
        .pipe($.addSrc.prepend('module.prefix'))
        .pipe($.addSrc.append('module.suffix'))
        .pipe($.concat(filename))
        .pipe($.preprocess({
            context: {
                VERSION: pkg.version
            }
        }))
        .pipe($.header(banner, {
            package: pkg
        }))
        .pipe(gulp.dest(DIST_DIR))
        .pipe($.ngAnnotate({
            add: true,
            remove: true,
            single_quotes: true
        }))
        .pipe($.sourcemaps.init())
        .pipe($.uglify({
            preserveComments: 'some'
        }))
        .pipe($.rename({
            suffix: '.min'
        }))
        .pipe($.sourcemaps.write('.'))
        .pipe(gulp.dest(DIST_DIR));
});

gulp.task('styles', function() {
    var filename = pkg.name + '.css';

    return gulp.src('src/**/*.less')
        .pipe($.newer(path.join(DIST_DIR, filename)))
        .pipe($.sourcemaps.init())
        .pipe($.less())
        .pipe($.concat(filename))
        .pipe($.header(banner, {
            package: pkg
        }))
        .pipe(gulp.dest(DIST_DIR))
        .pipe($.rename({
            suffix: '.min'
        }))
        .pipe($.sourcemaps.write('.'))
        .pipe(gulp.dest(DIST_DIR));
});

gulp.task('default', function(done) {
    runSequence(['scripts', 'styles'], done)
});

gulp.task('test', ['lint'], function(done) {
    karma.start({
        configFile: path.join(__dirname, 'karma.conf.js')
    }, done);
});

gulp.task('lint', function() {
    return gulp.src(SRC_FILES)
        .pipe($.jshint())
        .pipe($.jshint.reporter('jshint-stylish'))
        .pipe($.jshint.reporter('fail'));
});<commit_msg>styles(gulp): Wrap done in an anonymous function<commit_after>var DIST_DIR = 'dist',
    SRC_FILES = 'src/**/*.js',

    path = require('path'),

    date = require('moment'),
    del = require('del'),
    karma = require('karma').server,

    runSequence = require('run-sequence'),

    gulp = require('gulp'),
    $ = require('gulp-load-plugins')(),
    
    banner = [
        '/*!',
        ' * <%= package.title || package.name %> :: v<%= package.version %> :: <%= package.todayDate  %>',
        ' * web: <%= package.homepage %>',
        ' *',
        ' * Copyright (c) <%= package.todayYear %> | <%= package.author %>',
        ' * License: <%= package.license %>',
        ' */',
        ''
        ].join('\n'),

    pkg = require('./package.json');

pkg.todayDate = date().format('YYYY-MM-DD');
pkg.todayYear = date().format('YYYY');

gulp.task('clean', function(done) {
    del(DIST_DIR, done);
});

gulp.task('scripts', function() {
    var filename = pkg.name + '.js';

    return gulp.src(SRC_FILES)
        .pipe($.newer(path.join(DIST_DIR, filename)))
        .pipe($.angularFilesort())
        .pipe($.addSrc.prepend('module.prefix'))
        .pipe($.addSrc.append('module.suffix'))
        .pipe($.concat(filename))
        .pipe($.preprocess({
            context: {
                VERSION: pkg.version
            }
        }))
        .pipe($.header(banner, {
            package: pkg
        }))
        .pipe(gulp.dest(DIST_DIR))
        .pipe($.ngAnnotate({
            add: true,
            remove: true,
            single_quotes: true
        }))
        .pipe($.sourcemaps.init())
        .pipe($.uglify({
            preserveComments: 'some'
        }))
        .pipe($.rename({
            suffix: '.min'
        }))
        .pipe($.sourcemaps.write('.'))
        .pipe(gulp.dest(DIST_DIR));
});

gulp.task('styles', function() {
    var filename = pkg.name + '.css';

    return gulp.src('src/**/*.less')
        .pipe($.newer(path.join(DIST_DIR, filename)))
        .pipe($.sourcemaps.init())
        .pipe($.less())
        .pipe($.concat(filename))
        .pipe($.header(banner, {
            package: pkg
        }))
        .pipe(gulp.dest(DIST_DIR))
        .pipe($.rename({
            suffix: '.min'
        }))
        .pipe($.sourcemaps.write('.'))
        .pipe(gulp.dest(DIST_DIR));
});

gulp.task('default', function(done) {
    runSequence(['scripts', 'styles'], done)
});

gulp.task('test', ['lint'], function(done) {
    karma.start({
        configFile: path.join(__dirname, 'karma.conf.js')
    }, function() {
        done();
    });
});

gulp.task('lint', function() {
    return gulp.src(SRC_FILES)
        .pipe($.jshint())
        .pipe($.jshint.reporter('jshint-stylish'))
        .pipe($.jshint.reporter('fail'));
});
{'fraction_non_alphanumeric': 0.2127892147932228, 'fraction_numerical': 0.0, 'mean_word_length': 2.04661487236404, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '5845946', 'n_tokens_mistral': 1876, 'n_tokens_neox': 1775, 'n_words': 253}