<commit_before>'use strict';

var gulp = require('gulp');

var $ = require('gulp-load-plugins')({
  pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del']
});

gulp.task('jshint', function () {
  return gulp.src('src/components/**/*.js')
    .pipe($.jshint())
    .pipe($.jshint.reporter('jshint-stylish'));
});

gulp.task('partials', function () {
  return gulp.src('src/components/**/*.html')
    .pipe($.minifyHtml({
      empty: true,
      spare: true,
      quotes: true
    }))
    .pipe($.angularTemplatecache('templateCacheHtml.js', {
      module: 'freelook.info',
      root: 'components/'
    }))
    .pipe(gulp.dest('.tmp/inject/'));
});

gulp.task('html', ['jshint', 'inject', 'partials'], function () {

  var htmlFilter = $.filter('*.html'),
    jsFilter = $.filter('**/*.js'),
    cssFilter = $.filter('**/*.css'),
    indexFilter = $.filter('index.html'),
    assets;

  return gulp.src('.tmp/*.html')
    .pipe($.inject(gulp.src('.tmp/inject/templateCacheHtml.js', {read: false}), {
      starttag: '<!-- inject:partials -->',
      ignorePath: '.tmp',
      addRootSlash: false
    }))
    .pipe(assets = $.useref.assets())
    .pipe($.rev())
    .pipe(jsFilter)
    .pipe($.if(!process.env.debug, $.ngAnnotate()))
    .pipe($.if(!process.env.debug, $.uglify()))
    .pipe(gulp.dest('dist/'))
    .pipe(gulp.dest('.tmp/'))
    .pipe(jsFilter.restore())
    .pipe(cssFilter)
    .pipe($.if(!process.env.debug, $.csso()))
    .pipe($.if(!process.env.debug, $.stripCssComments({all: true})))
    .pipe(gulp.dest('dist/'))
    .pipe($.replace('../', ''))
    .pipe(gulp.dest('.tmp/'))
    .pipe(cssFilter.restore())
    .pipe(assets.restore())
    .pipe($.useref())
    .pipe($.revReplace())
    .pipe(gulp.dest('.tmp/'))
    .pipe(htmlFilter)
    .pipe($.minifyHtml({empty: true, spare: true, quotes: true}))
    .pipe(indexFilter)
    .pipe($.assetpaths({
      newDomain: 'http://freelook.info',
      oldDomain: '_._',
      docRoot: '/',
      filetypes: ['png', 'js', 'css', 'ico']
    }))
    .pipe(indexFilter.restore())
    .pipe(gulp.dest('dist/'))
    .pipe(htmlFilter.restore())
    .pipe($.size({title: 'Build', showFiles: true}))
});

gulp.task('images', function () {
  return gulp.src('src/assets/images/**/*')
    .pipe($.cache($.imagemin({
      optimizationLevel: 3,
      progressive: true,
      interlaced: true
    })))
    .pipe(gulp.dest('dist/assets/images/'));
});

gulp.task('fonts', function () {
  return gulp.src($.mainBowerFiles())
    .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}'))
    .pipe($.flatten())
    .pipe(gulp.dest('dist/fonts/'));
});

gulp.task('misc', function () {
  return gulp.src(['src/**/*.ico', 'src/**/*.xml', 'src/.gitignore', 'src/*.json', 'src/*.js'])
    .pipe(gulp.dest('dist/'));
});

gulp.task('vendors', function () {
  return gulp.src(['src/vendors/**/*.js', 'src/vendors/**/*.html'])
    .pipe(gulp.dest('dist/vendors'));
});

gulp.task('clean', function (done) {
  $.del(['dist/', '.tmp/'], done);
});

gulp.task('pack', [], function () {<commit_msg>fix build for txt<commit_after>'use strict';

var gulp = require('gulp');

var $ = require('gulp-load-plugins')({
  pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del']
});

gulp.task('jshint', function () {
  return gulp.src('src/components/**/*.js')
    .pipe($.jshint())
    .pipe($.jshint.reporter('jshint-stylish'));
});

gulp.task('partials', function () {
  return gulp.src('src/components/**/*.html')
    .pipe($.minifyHtml({
      empty: true,
      spare: true,
      quotes: true
    }))
    .pipe($.angularTemplatecache('templateCacheHtml.js', {
      module: 'freelook.info',
      root: 'components/'
    }))
    .pipe(gulp.dest('.tmp/inject/'));
});

gulp.task('html', ['jshint', 'inject', 'partials'], function () {

  var htmlFilter = $.filter('*.html'),
    jsFilter = $.filter('**/*.js'),
    cssFilter = $.filter('**/*.css'),
    indexFilter = $.filter('index.html'),
    assets;

  return gulp.src('.tmp/*.html')
    .pipe($.inject(gulp.src('.tmp/inject/templateCacheHtml.js', {read: false}), {
      starttag: '<!-- inject:partials -->',
      ignorePath: '.tmp',
      addRootSlash: false
    }))
    .pipe(assets = $.useref.assets())
    .pipe($.rev())
    .pipe(jsFilter)
    .pipe($.if(!process.env.debug, $.ngAnnotate()))
    .pipe($.if(!process.env.debug, $.uglify()))
    .pipe(gulp.dest('dist/'))
    .pipe(gulp.dest('.tmp/'))
    .pipe(jsFilter.restore())
    .pipe(cssFilter)
    .pipe($.if(!process.env.debug, $.csso()))
    .pipe($.if(!process.env.debug, $.stripCssComments({all: true})))
    .pipe(gulp.dest('dist/'))
    .pipe($.replace('../', ''))
    .pipe(gulp.dest('.tmp/'))
    .pipe(cssFilter.restore())
    .pipe(assets.restore())
    .pipe($.useref())
    .pipe($.revReplace())
    .pipe(gulp.dest('.tmp/'))
    .pipe(htmlFilter)
    .pipe($.minifyHtml({empty: true, spare: true, quotes: true}))
    .pipe(indexFilter)
    .pipe($.assetpaths({
      newDomain: 'http://freelook.info',
      oldDomain: '_._',
      docRoot: '/',
      filetypes: ['png', 'js', 'css', 'ico']
    }))
    .pipe(indexFilter.restore())
    .pipe(gulp.dest('dist/'))
    .pipe(htmlFilter.restore())
    .pipe($.size({title: 'Build', showFiles: true}))
});

gulp.task('images', function () {
  return gulp.src('src/assets/images/**/*')
    .pipe($.cache($.imagemin({
      optimizationLevel: 3,
      progressive: true,
      interlaced: true
    })))
    .pipe(gulp.dest('dist/assets/images/'));
});

gulp.task('fonts', function () {
  return gulp.src($.mainBowerFiles())
    .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}'))
    .pipe($.flatten())
    .pipe(gulp.dest('dist/fonts/'));
});

gulp.task('misc', function () {
  return gulp.src(['src/**/*.ico', 'src/**/*.xml', 'src/.gitignore', 'src/*.json', 'src/*.js', 'src/*.txt'])
    .pipe(gulp.dest('dist/'));
});

gulp.task('vendors', function () {
  return gulp.src(['src/vendors/**/*.js', 'src/vendors/**/*.html'])
    .pipe(gulp.dest('dist/vendors'));
});

gulp.task('clean', function (done) {
  $.del(['dist/', '.tmp/'], done);
});

gulp.task('pack', [], function () {
{'fraction_non_alphanumeric': 0.26411389297987237, 'fraction_numerical': 0.0006545573555882834, 'mean_word_length': 3.1949210706932054, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '718315', 'n_tokens_mistral': 2282, 'n_tokens_neox': 2263, 'n_words': 310}