<commit_before>var gulp = require('gulp');
var gulpif = require('gulp-if');
var using = require('gulp-using');
var filter = require('gulp-filter');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
var replace = require('gulp-replace');
var header = require('gulp-header');
var uglify = require('gulp-uglify');
var tap = require('gulp-tap');
var header = require('gulp-header');
var footer = require('gulp-footer');
var sourcemaps = require('gulp-sourcemaps');
var header = require('gulp-header');
var footer = require('gulp-footer');
var path = require('path');

var config = require('../config');
var banner = require('../utils/banner');

gulp.task('dist', ['dist:lib', 'dist:ui', 'dist:templates']);

gulp.task('dist:lib', function() {

  var pkg = require(path.join(config.project.path, 'package.json'));
  var version = '$1v' + pkg.version + '$3';

  return gulp.src(config.lib.src)
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(replace(config.regex.JSHINT, ''))
    .pipe(replace(config.regex.GLOBAL, ''))
    .pipe(replace(config.regex.VERSION, version))
    .pipe(tap(function(file) {
      var relativePath = file.path.match(/availity-angular(.*)/)[1];
      file.relativePath = relativePath;
    }))
    .pipe(header('// Source: <%= file.relativePath %>\n'))
    .pipe(concat(config.lib.name))
    .pipe(header(banner() + '\n'))
    .pipe(sourcemaps.write(config.lib.destMaps))
    .pipe(gulp.dest(config.lib.destDist))
    .pipe(filter('**/*.js'))
    .pipe(uglify({
      mangle: false,
      preserveComments: false,
      compress: false
    }))
    .pipe(header(banner() + '\n'))
    .pipe(rename({ extname: '.min.js' }))
    .pipe(gulpif(config.args.verbose, using({prefix: 'Task [dist:js] using'})))
    .pipe(sourcemaps.write(config.lib.destMaps))
    .pipe(gulp.dest(config.lib.destDist));

});

gulp.task('dist:ui', function() {

  return gulp.src(config.ui.src)
    .pipe(sourcemaps.init({loadMaps: true}))<commit_msg>add version number to global availity.VERSION<commit_after>var gulp = require('gulp');
var gulpif = require('gulp-if');
var fs = require('fs');
var using = require('gulp-using');
var filter = require('gulp-filter');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
var replace = require('gulp-replace');
var header = require('gulp-header');
var uglify = require('gulp-uglify');
var tap = require('gulp-tap');
var header = require('gulp-header');
var footer = require('gulp-footer');
var sourcemaps = require('gulp-sourcemaps');
var header = require('gulp-header');
var footer = require('gulp-footer');
var path = require('path');

var config = require('../config');
var banner = require('../utils/banner');

gulp.task('dist', ['dist:lib', 'dist:ui', 'dist:templates']);

gulp.task('dist:lib', function() {

  var getPkgRegex = function() {
    var pkg = JSON.parse(fs.readFileSync(path.join(config.project.path, 'package.json'), 'utf8'));
    return '$1v' + pkg.version + '$3';
  };

  return gulp.src(config.lib.src)
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(replace(config.regex.JSHINT, ''))
    .pipe(replace(config.regex.GLOBAL, ''))
    .pipe(replace(config.regex.VERSION, getPkgRegex()))
    .pipe(tap(function(file) {
      var relativePath = file.path.match(/availity-angular(.*)/)[1];
      file.relativePath = relativePath;
    }))
    .pipe(header('// Source: <%= file.relativePath %>\n'))
    .pipe(concat(config.lib.name))
    .pipe(header(banner() + '\n'))
    .pipe(sourcemaps.write(config.lib.destMaps))
    .pipe(gulp.dest(config.lib.destDist))
    .pipe(filter('**/*.js'))
    .pipe(uglify({
      mangle: false,
      preserveComments: false,
      compress: false
    }))
    .pipe(header(banner() + '\n'))
    .pipe(rename({ extname: '.min.js' }))
    .pipe(gulpif(config.args.verbose, using({prefix: 'Task [dist:js] using'})))
    .pipe(sourcemaps.write(config.lib.destMaps))
    .pipe(gulp.dest(config.lib.destDist));

});

gulp.task('dist:ui', function() {

  return gulp.src(config.ui.src)
    .pipe(sourcemaps.init({loadMaps: true}))
{'fraction_non_alphanumeric': 0.20815925288768738, 'fraction_numerical': 0.0017203244040304743, 'mean_word_length': 4.272020725388601, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2051350', 'n_tokens_mistral': 1435, 'n_tokens_neox': 1405, 'n_words': 246}