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

var appdir = "public/",
    srcdir = "src/";

// Pug
var pug = require('gulp-pug');

// Sass
var sass = require('gulp-sass');

// Typescript
var ts = require('gulp-typescript'),
    tsProject = ts.createProject('tsconfig.json');


//
gulp.task('build-css', () => {
    return gulp.src(srcdir + "/stylesheets/**.scss")
        .pipe(sass().on('error', sass.logError))
        .pipe(gulp.dest(appdir + "/css"));
});

gulp.task('build-js', () => {
    return gulp.src(srcdir + "/**/*.ts")
        .pipe(ts(tsProject))
        .pipe(gulp.dest(appdir + "/app"));
});

gulp.task('build-pug', () => {
    return gulp.src(srcdir + "/views/**/*.pug")
        .pipe(pug())
        .pipe(gulp.dest(appdir + "/views"));
});

gulp.task('watch', () => {
    // TODO livereloading plugin
    gulp.watch("src/**/*.ts", ['build-js']);
    gulp.watch("src/**/*.pug", ['build-pug']);
    gulp.watch("src/stylesheets/**/*.scss", ['build-css']);
});


// Default task
gulp.task('default', ['build-ts', 'build-css', 'build-pug']);<commit_msg>Refactor gulpfile<commit_after>var gulp = require('gulp'),
    pug  = require('gulp-pug'),
    sass = require('gulp-sass'),
    ts   = require('gulp-typescript');

var appdir = "public/",
    srcdir = "src/";

// Typescript
var tsProject = ts.createProject('tsconfig.json');

//
gulp.task('build-css', () => {
    return gulp.src(srcdir + "/stylesheets/**.scss")
        .pipe(sass().on('error', sass.logError))
        .pipe(gulp.dest(appdir + "/css"));
});

gulp.task('build-js', () => {
    return gulp.src(srcdir + "/**/*.ts")
        .pipe(ts(tsProject))
        .pipe(gulp.dest(appdir + "/app"));
});

gulp.task('build-pug', () => {
    return gulp.src(srcdir + "/views/**/*.pug")
        .pipe(pug())
        .pipe(gulp.dest(appdir + "/views"));
});

gulp.task('watch', () => {
    // TODO livereloading plugin
    gulp.watch("src/**/*.ts", ['build-js']);
    gulp.watch("src/views/**/*.pug", ['build-pug']);
    gulp.watch("src/stylesheets/**/*.scss", ['build-css']);
});


// Default task
gulp.task('default', ['build-ts', 'build-css', 'build-pug']);
{'fraction_non_alphanumeric': 0.2633066415449835, 'fraction_numerical': 0.0, 'mean_word_length': 3.045714285714286, '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': '3565659', 'n_tokens_mistral': 818, 'n_tokens_neox': 816, 'n_words': 116}