<commit_before>'use strict';

var browserify  = require('browserify');
var gulp        = require('gulp');

var concat    = require('gulp-concat');
var importCss = require('gulp-import-css');
var minifyCss = require('gulp-minify-css');
var nodemon   = require('gulp-nodemon');
var streamify = require('gulp-streamify');
var uglify    = require('gulp-uglify');

var source = require('vinyl-source-stream');

gulp.task('compile-js', function() {
  return browserify('src/js/splash.js')
  .bundle()
  .pipe(source('splash.min.js'))
  .pipe(streamify(uglify()))
  .pipe(gulp.dest('public'));
});

gulp.task('compile-css', function() {
  return gulp.src('src/css/splash.css')
    .pipe(importCss())
    .pipe(concat('splash.min.css'))
    .pipe(minifyCss('splash.min.css'))
    .pipe(gulp.dest('public'));
});

gulp.task('compile', ['compile-js', 'compile-css']);

gulp.task('server', ['compile'], function () {
  return nodemon({
    script: 'server.js',
    ext: 'js css html',
    env: { 'NODE_ENV': 'development' },
    tasks: ['compile']
  });
});<commit_msg>Updated gulp server task to be more efficient<commit_after>'use strict';

var browserify  = require('browserify');
var gulp        = require('gulp');

var concat    = require('gulp-concat');
var importCss = require('gulp-import-css');
var minifyCss = require('gulp-minify-css');
var nodemon   = require('gulp-nodemon');
var streamify = require('gulp-streamify');
var uglify    = require('gulp-uglify');

var source = require('vinyl-source-stream');

gulp.task('compile-js', function() {
  return browserify('src/js/splash.js')
  .bundle()
  .pipe(source('splash.min.js'))
  .pipe(streamify(uglify()))
  .pipe(gulp.dest('public'));
});

gulp.task('compile-css', function() {
  return gulp.src('src/css/splash.css')
    .pipe(importCss())
    .pipe(concat('splash.min.css'))
    .pipe(minifyCss('splash.min.css'))
    .pipe(gulp.dest('public'));
});

gulp.task('compile', ['compile-js', 'compile-css']);

gulp.task('server', ['compile'], function() {
  gulp.watch('./src/css/*.css', ['compile-css']);
  gulp.watch('./src/js/*.js', ['compile-js']);
  return nodemon({
    script: 'server',
    env: { NODE_ENV: 'development'},
    watch: ['server/**/*.js'],
  });
});
{'fraction_non_alphanumeric': 0.2223222322232223, 'fraction_numerical': 0.0, 'mean_word_length': 4.395631067961165, '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': '5642147', 'n_tokens_mistral': 801, 'n_tokens_neox': 796, 'n_words': 135}