<commit_before>var gulp = require('gulp');
var jshint = require('gulp-jshint');
var less = require('gulp-less');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var react = require('gulp-react');
var flowtype = require('gulp-flowtype');

// Lint Task
gulp.task('lint', function() {
    return gulp.src('build/**/*.js')
        .pipe(jshint({
            esnext: true
        }))
        .pipe(jshint.reporter('default'));
});

gulp.task('typecheck', function() {
    return gulp.src('js/**/*.js')
        .pipe(flowtype({
            declarations: './flowtypes',
        }))
        .pipe(jshint.reporter('default'));
});

// Compile Our LESS
gulp.task('less', function() {
    return gulp.src('./style/**/*.less')
        .pipe(less({
            paths: ['./style']
        }))
        .pipe(gulp.dest('./build/css'));
});

gulp.task('react', function() {
    return gulp.src('./js/**/*.js')
        .pipe(react({
            harmony: true,
            // Skip Flow type annotations!
            stripTypes: true
        }))
        .pipe(gulp.dest('./build'));

});

// Concatenate & Minify JS
gulp.task('releasify', function() {
    return gulp.src('build/**/*.js')
        .pipe(concat('all.js'))
        .pipe(gulp.dest('dist'))
        .pipe(rename('all.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('dist'));
});

// Watch Files For Changes
gulp.task('watch', function() {
    gulp.watch('js/**/*.js', ['react']);
    gulp.watch('build/**/*.js', ['lint']);
    gulp.watch('style/**/*.less', ['less']);
});

// Default Task
// Not including Flow typechecking by default because it takes so painfully long.
// Maybe because of my code layout or otheriwse, needto figure it out before enabling by default.
gulp.task('default', ['react', 'less', 'lint', 'watch']);
<commit_msg>Tweak Flow typecheck gulp rule<commit_after>var gulp = require('gulp');
var jshint = require('gulp-jshint');
var less = require('gulp-less');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var react = require('gulp-react');
var flowtype = require('gulp-flowtype');

// Lint Task
gulp.task('lint', function() {
    return gulp.src('build/**/*.js')
        .pipe(jshint({
            esnext: true
        }))
        .pipe(jshint.reporter('default'));
});

gulp.task('typecheck', function() {
    return gulp.src('js/**/*.js')
        .pipe(flowtype({
            declarations: './flowtypes',
            background: false,    // Watch/Server mode
            all: false,           // Check all files regardless
            lib: '',              // Library directory
            module: '',           // Module mode
            stripRoot: false,     // Relative vs Absolute paths
            weak: false,          // Force weak check
            showAllErrors: false, // Show more than 50 errors
            killFlow: false,
        }))
        .pipe(jshint.reporter('default'));
});

// Compile Our LESS
gulp.task('less', function() {
    return gulp.src('./style/**/*.less')
        .pipe(less({
            paths: ['./style']
        }))
        .pipe(gulp.dest('./build/css'));
});

gulp.task('react', function() {
    return gulp.src('./js/**/*.js')
        .pipe(react({
            harmony: true,
            // Skip Flow type annotations!
            stripTypes: true
        }))
        .pipe(gulp.dest('./build'));

});

// Concatenate & Minify JS
gulp.task('releasify', function() {
    return gulp.src('build/**/*.js')
        .pipe(concat('all.js'))
        .pipe(gulp.dest('dist'))
        .pipe(rename('all.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('dist'));
});

// Watch Files For Changes
gulp.task('watch', function() {
    gulp.watch('js/**/*.js', ['react']);
    gulp.watch('build/**/*.js', ['lint']);
    gulp.watch('style/**/*.less', ['less']);
});

// Default Task
// Not including Flow typechecking by default because it takes so painfully long.
// Maybe because of my code layout or otheriwse, needto figure it out before enabling by default.
gulp.task('default', ['react', 'less', 'lint', 'watch']);

{'fraction_non_alphanumeric': 0.20076941572493387, 'fraction_numerical': 0.00048088482808367395, 'mean_word_length': 2.404255319148936, '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': '2517186', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1310, 'n_words': 292}