<commit_before>var gulp = require("gulp"),
    concat = require("gulp-concat"),
    uglify = require("gulp-uglify"),
    htmlmin = require("gulp-htmlmin"),
    server = require("gulp-server-livereload"),
    debug = require("gulp-debug"),
    cleanCSS = require("gulp-clean-css"),
    eslint = require("gulp-eslint"),
    pump = require("pump");

var config = {
    dist: "./dist/",
    libs: {
        js: {
            dirs: [
                "bower_components/angular/angular.js",
                "bower_components/angular-animate/angular-animate.js",
                "bower_components/angular-aria/angular-aria.js",
                "bower_components/angular-material/angular-material.js"
            ],
            name: "libs.min.js"
        },
        css: {
            dirs: [
                "bower_components/angular-material/angular-material.css"
            ],
            name: "libs.min.css"
        }
    },
    app: {
        js: {
            dirs: "app/**/*.js",
            name: "app.min.js"
        }
    }
};

var js = [
    {src: config.libs.js.dirs, name: config.libs.js.name, dest: config.dist},
    {src: config.app.js.dirs, name: config.app.js.name, dest: config.dist}
];

var css = [
    {src: config.libs.css.dirs, name: config.libs.css.name, dest: config.dist}
];

gulp.task("lint", function () {
    return pump([
        gulp.src(config.app.js.dirs),
        eslint(),
        eslint.format(),
        eslint.failAfterError()
    ]);
});

gulp.task("js", ["lint"], function () {
    var options = {
        preserveComments: 'license'
    };

    js.forEach(function (item) {
        pump([
            gulp.src(item.src),
            uglify(options),
            concat(item.name),
            gulp.dest(item.dest)
        ]);
    });
});

gulp.task("css", function () {
    css.forEach(function (item) {
        pump([
            gulp.src(item.src),
            cleanCSS({compatibility: "ie8"}),
            concat(item.name),
            gulp.dest(item.dest)
        ]);
    });
});

gulp.task("html", function () {
    pump([
        gulp.src("app/index.html"),
        htmlmin({collapseWhitespace: true}),
        gulp.dest(config.dist)
    ]);
});

gulp.task("webserver", function () {
    pump([
        gulp.src(config.dist),
        server({
            livereload: true
        })
    ]);
});

gulp.task("watch", function () {
    gulp.watch("app/**/*.html", ["html"]);
    gulp.watch("app/**/*.js", ["js"]);
    gulp.watch("app/**/*.css", ["css"]);
});

gulp.task("default", ["prod"]);
gulp.task("prod", ["js", "css", "html"]);
gulp.task("dev", ["prod", "webserver", "watch"]);<commit_msg>make files before start webserver<commit_after>var gulp = require("gulp"),
    concat = require("gulp-concat"),
    uglify = require("gulp-uglify"),
    htmlmin = require("gulp-htmlmin"),
    server = require("gulp-server-livereload"),
    debug = require("gulp-debug"),
    cleanCSS = require("gulp-clean-css"),
    eslint = require("gulp-eslint"),
    pump = require("pump");

var config = {
    dist: "./dist/",
    libs: {
        js: {
            dirs: [
                "bower_components/angular/angular.js",
                "bower_components/angular-animate/angular-animate.js",
                "bower_components/angular-aria/angular-aria.js",
                "bower_components/angular-material/angular-material.js"
            ],
            name: "libs.min.js"
        },
        css: {
            dirs: [
                "bower_components/angular-material/angular-material.css"
            ],
            name: "libs.min.css"
        }
    },
    app: {
        js: {
            dirs: "app/**/*.js",
            name: "app.min.js"
        }
    }
};

var js = [
    {src: config.libs.js.dirs, name: config.libs.js.name, dest: config.dist},
    {src: config.app.js.dirs, name: config.app.js.name, dest: config.dist}
];

var css = [
    {src: config.libs.css.dirs, name: config.libs.css.name, dest: config.dist}
];

gulp.task("lint", function () {
    return pump([
        gulp.src(config.app.js.dirs),
        eslint(),
        eslint.format(),
        eslint.failAfterError()
    ]);
});

gulp.task("js", ["lint"], function () {
    var options = {
        preserveComments: 'license'
    };

    js.forEach(function (item) {
        pump([
            gulp.src(item.src),
            uglify(options),
            concat(item.name),
            gulp.dest(item.dest)
        ]);
    });
});

gulp.task("css", function () {
    css.forEach(function (item) {
        pump([
            gulp.src(item.src),
            cleanCSS({compatibility: "ie8"}),
            concat(item.name),
            gulp.dest(item.dest)
        ]);
    });
});

gulp.task("html", function () {
    pump([
        gulp.src("app/index.html"),
        htmlmin({collapseWhitespace: true}),
        gulp.dest(config.dist)
    ]);
});

gulp.task("webserver", ["prod"], function () {
    pump([
        gulp.src(config.dist),
        server({
            livereload: true
        })
    ]);
});

gulp.task("watch", function () {
    gulp.watch("app/**/*.html", ["html"]);
    gulp.watch("app/**/*.js", ["js"]);
    gulp.watch("app/**/*.css", ["css"]);
});

gulp.task("default", ["prod"]);
gulp.task("prod", ["js", "css", "html"]);
gulp.task("dev", ["webserver", "watch"]);
{'fraction_non_alphanumeric': 0.19364599092284418, 'fraction_numerical': 0.00037821482602118004, 'mean_word_length': 1.9663488502523836, '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': '2035980', 'n_tokens_mistral': 1800, 'n_tokens_neox': 1765, 'n_words': 261}