<commit_before>var gulp = require('gulp'),
  gutil = require('gulp-util'),
  bower = require('bower'),
  concat = require('gulp-concat'),
  sass = require('gulp-sass'),
  minifyCss = require('gulp-minify-css'),
  rename = require('gulp-rename'),
  sh = require('shelljs'),
  mocha = require('gulp-mocha'),
  casper = require('gulp-casperjs-options'),
  karma = require('gulp-karma2'),
  express = require('gulp-express'),
  jshint = require('gulp-jshint'),
  uglify = require('gulp-uglify'),
  beautify = require('gulp-beautify'),
  cssbeautify = require('gulp-cssbeautify'),
  copy = require('gulp-copy'),
  strip = require('gulp-strip-debug'),
  del = require('del'),
  protractor = require('gulp-angular-protractor'),
  nodemon = require('gulp-nodemon'),
  notify = require('gulp-notify'),
  livereload = require('gulp-livereload'),
  browserify = require('gulp-browserify'),
  embedlr = require('gulp-embedlr'),
  lrserver = require('tiny-lr')();

  // in what order should the files be concatenated
var clientIncludeOrder = [];

var filepath = {
  clean: {
    client: ['dist/assets/css', 'dist/assets/js/client', 'dist/assets/img'],
    server: 'dist/assets/js/server'
  },
  lint: {
    client: {
      src: 'client/www/app/**/*.js',
    },
    server: {
      src: ['server/server.js, server/qa/*.js']
    }
  },
  concat: {
    client: {
      dest: 'dist/assets/js/client'
    },
    server: {
      dest: 'dist/assets/js/server'
    }
  },
  uglify: {
    client: {
      dest: 'dist/assets/js/clients'
    },
    server: {
      dest: 'dist/assets/js/server'
    }
  }
}

// gulp setup
var config = require('package.json');

//delete all files in the client distribution
gulp.task('clean-client', function() {
  return del(filepath.clean.client);
});

//delete all files in the server distribution
gulp.task('clean-server', function() {
  return del(filepath.clean.server);
});

//delete all files in the client and server distribution
gulp.task('clean', ['clean-client', 'clean-server']);

// Lint the client dev files.
gulp.task('lint', function() {
    return gulp.src(filepath.lint.client.src)
        .pipe(jshint())
        .pipe(jshint.reporter('default'));
});

// Lint the server dev files.
gulp.task('lint', function() {
    return gulp.src(filepath.lint.client.src)
        .pipe(jshint())
        .pipe(jshint.reporter('default'));
});

// Lint the client and server dev files
gulp.task('lint', ['lint-client', 'lint-server']);

//Uglify the files
gulp.task('uglify', function() {
    return gulp.src('js/*.js')
      .pipe(uglify())
      .pipe(gulp.dest(dist/assets));
});

/**/
gulp.task('scripts', function() {
    return gulp.src(clientIncludeOrder)
        .pipe(concat('all.js'))
        .pipe(gulp.dest('dist'))
        .pipe(rename('all.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('dist'));
});

//Refresh when files change
gulp.task('refresh', function() {
	// listen for changes
	livereload.listen();
	// configure nodemon
	nodemon({
		// the script to run the app<commit_msg>Add uglify-server and uglify-client tasks.<commit_after>var gulp = require('gulp'),
  gutil = require('gulp-util'),
  bower = require('bower'),
  concat = require('gulp-concat'),
  sass = require('gulp-sass'),
  minifyCss = require('gulp-minify-css'),
  rename = require('gulp-rename'),
  sh = require('shelljs'),
  mocha = require('gulp-mocha'),
  casper = require('gulp-casperjs-options'),
  karma = require('gulp-karma2'),
  express = require('gulp-express'),
  jshint = require('gulp-jshint'),
  uglify = require('gulp-uglify'),
  beautify = require('gulp-beautify'),
  cssbeautify = require('gulp-cssbeautify'),
  copy = require('gulp-copy'),
  strip = require('gulp-strip-debug'),
  del = require('del'),
  protractor = require('gulp-angular-protractor'),
  nodemon = require('gulp-nodemon'),
  notify = require('gulp-notify'),
  livereload = require('gulp-livereload'),
  browserify = require('gulp-browserify'),
  embedlr = require('gulp-embedlr'),
  lrserver = require('tiny-lr')();

  // in what order should the files be concatenated
var clientConcatOrder = [];
var serverConcatOrder = [];

var filepath = {
  clean: {
    client: ['dist/assets/css', 'dist/assets/js/client', 'dist/assets/img'],
    server: 'dist/assets/js/server'
  },
  lint: {
    client: {
      src: 'client/www/app/**/*.js',
    },
    server: {
      src: ['server/server.js, server/qa/*.js']
    }
  },
  concat: {
    client: {
      src: clientConcatOrder,
      dest: 'dist/assets/js/client'
    },
    server: {serverConcatOrder,
      dest: 'dist/assets/js/server'
    }
  },
  uglify: {
    client: {
      src: 'dist/assets/js/client/*.min' 
      dest: 'dist/assets/js/client'
    },
    server: {
      src: 'dist/assets/js/server/*.min' 
      dest: 'dist/assets/js/server'
    }
  }
}

// gulp setup
var config = require('package.json');

//delete all files in the client distribution
gulp.task('clean-client', function() {
  return del(filepath.clean.client);
});

//delete all files in the server distribution
gulp.task('clean-server', function() {
  return del(filepath.clean.server);
});

//delete all files in the client and server distribution
gulp.task('clean', ['clean-client', 'clean-server']);

// Lint the client dev files.
gulp.task('lint-client', function() {
    return gulp.src(filepath.lint.client.src)
        .pipe(jshint())
        .pipe(jshint.reporter('default'));
});

// Lint the server dev files.
gulp.task('lint-server', function() {
    return gulp.src(filepath.lint.client.src)
        .pipe(jshint())
        .pipe(jshint.reporter('default'));
});

// Lint the client and server dev files
gulp.task('lint', ['lint-client', 'lint-server']);

//Uglify the client files
gulp.task('uglify-client', function() {
    return gulp.src(filepath.uglify.client.src)
      .pipe(uglify())
      .pipe(gulp.dest(filepath.uglify.client.dest));
});

//Uglify the server files
gulp.task('uglify-server', function() {
    return gulp.src(filepath.uglify.server.src)
      .pipe(uglify())
      .pipe(gulp.dest(filepath.uglify.server.dest));
});

//Uglify the client and server files
gulp.task('uglify', ['uglify-client', 'uglify-server']);

gulp.task('scripts-client', function() {
    return gulp.src(filepath)
        .pipe(concat('all.js'))
        .pipe(gulp.dest('dist'))
        .pipe(rename('all.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('dist'));
});

//Refresh when files change
gulp.task('refresh', function() {
	// listen for changes
	livereload.listen();
	// configure nodemon
	nodemon({
		// the script to run the app
{'fraction_non_alphanumeric': 0.18528651770785834, 'fraction_numerical': 0.0003039975680194558, 'mean_word_length': 3.3662906436629063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4955357', 'n_tokens_mistral': 2313, 'n_tokens_neox': 2290, 'n_words': 436}