<commit_before>var gulp = require('gulp');


gulp.task('twig', function() {
  'use strict';

  var twig = require('gulp-twig');
  var rename = require('gulp-rename');
  var yaml = require('js-yaml');
  var data = require('gulp-data');
  var path = require('path');
  var fs = require('fs');
  var htmlhint = require('gulp-htmlhint');

  var utils = require('./gulp.utils');
  var filters = require('../twig/filters');
  var pathsHelper = require('../helpers/paths.helper');

  return gulp.src([`${pathsHelper.pages}/**/*.twig`])
    .pipe(htmlhint('./.htmlhintrc'))
    .pipe(htmlhint.failReporter())
    .pipe(data(function(file) {
      var filename = path.basename(file.path, path.extname(file.path));

      var pageData = yaml.safeLoad(fs.readFileSync(`${pathsHelper.pages}/${filename}/${filename}.yml`, 'utf8'));

      var concatedData = utils.concatPageDataWithLayoutData(pageData);

      var finalizedData = utils.checkAndLoadDefaultComponentData(concatedData);

      return finalizedData;
    }))
    .pipe(twig({
      filters: filters.FILTERS
    }))
    .pipe(rename(
      {dirname: ''}
    ))
    .pipe(
      gulp.dest(pathsHelper.tmp)
    );
});<commit_msg>PNG-10 change dest path for production<commit_after>var gulp = require('gulp');


gulp.task('twig', function() {
  'use strict';

  var twig = require('gulp-twig');
  var rename = require('gulp-rename');
  var yaml = require('js-yaml');
  var data = require('gulp-data');
  var path = require('path');
  var fs = require('fs');
  var htmlhint = require('gulp-htmlhint');

  var utils = require('./gulp.utils');
  var filters = require('../twig/filters');
  var pathsHelper = require('../helpers/paths.helper');
  var isDev = process.env.NODE_ENV === 'development';

  return gulp.src([`${pathsHelper.pages}/**/*.twig`])
    .pipe(htmlhint('./.htmlhintrc'))
    .pipe(htmlhint.failReporter())
    .pipe(data(function(file) {
      var filename = path.basename(file.path, path.extname(file.path));

      var pageData = yaml.safeLoad(fs.readFileSync(`${pathsHelper.pages}/${filename}/${filename}.yml`, 'utf8'));

      var concatedData = utils.concatPageDataWithLayoutData(pageData);

      var finalizedData = utils.checkAndLoadDefaultComponentData(concatedData);

      return finalizedData;
    }))
    .pipe(twig({
      filters: filters.FILTERS
    }))
    .pipe(rename(
      {dirname: ''}
    ))
    .pipe(
      gulp.dest(isDev ? pathsHelper.tmp : pathsHelper.build)
    );
});
{'fraction_non_alphanumeric': 0.18178121187474583, 'fraction_numerical': 0.0016266775111834079, 'mean_word_length': 3.606741573033708, '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': '7357034', 'n_tokens_mistral': 828, 'n_tokens_neox': 807, 'n_words': 141}