<commit_before>'use strict';

//////////////////////////////
// Requires
//////////////////////////////
var gutil = require('gulp-util'),
    browserSync = require('browser-sync'),
    front = require('gulp-front-matter'),
    swig = require('../helpers/library-build'),
    dest = require('../helpers/relative-dest'),
    reload = browserSync.reload;

//////////////////////////////
// Internal Vars
//////////////////////////////
var toLibrary = [
  'language/**/*.md',
  '!language/README.md',
  '!language/bower_components/**/*'
];

//////////////////////////////
// Export
//////////////////////////////
module.exports = function (gulp, LibraryPaths) {
  // Set value of paths to either the default or user entered
  LibraryPaths = LibraryPaths || toLibrary;

  //////////////////////////////
  // Encapsulate task in function to choose path to work on
  //////////////////////////////
  var LibraryTask = function (path) {
    return gulp.src(LibraryPaths)
      .pipe(front({ property: 'meta' }))
      .pipe(swig())
      .pipe(dest('./tmp/'));
      // .pipe(reload({stream: true}));
  }

  //////////////////////////////
  // Core Task
  //////////////////////////////
  gulp.task('language', function () {
    return LibraryTask(LibraryPaths);
  });

  //////////////////////////////<commit_msg>:bug: Fix all files being recompiled on watch<commit_after>'use strict';

//////////////////////////////
// Requires
//////////////////////////////
var gutil = require('gulp-util'),
    browserSync = require('browser-sync'),
    front = require('gulp-front-matter'),
    swig = require('../helpers/library-build'),
    dest = require('../helpers/relative-dest'),
    reload = browserSync.reload;

//////////////////////////////
// Internal Vars
//////////////////////////////
var toLibrary = [
  'language/**/*.md',
  '!language/README.md',
  '!language/bower_components/**/*'
];

//////////////////////////////
// Export
//////////////////////////////
module.exports = function (gulp, LibraryPaths) {
  // Set value of paths to either the default or user entered
  LibraryPaths = LibraryPaths || toLibrary;

  //////////////////////////////
  // Encapsulate task in function to choose path to work on
  //////////////////////////////
  var LibraryTask = function (path) {
    return gulp.src(path)
      .pipe(front({ property: 'meta' }))
      .pipe(swig())
      .pipe(dest('./tmp/'));
      // .pipe(reload({stream: true}));
  }

  //////////////////////////////
  // Core Task
  //////////////////////////////
  gulp.task('language', function () {
    return LibraryTask(LibraryPaths);
  });

  //////////////////////////////
{'fraction_non_alphanumeric': 0.37405159332321697, 'fraction_numerical': 0.0, 'mean_word_length': 1.2772020725388602, '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': '6371814', 'n_tokens_mistral': 660, 'n_tokens_neox': 650, 'n_words': 149}