<commit_before>'use strict';

import fs from 'fs';
import gulp from 'gulp';
import debug from 'gulp-debug';
import pjson from './package.json';
import minimist from 'minimist';

//- Import all gulp-* based plugins
import gulpLoadPlugins from 'gulp-load-plugins';
const plugins = gulpLoadPlugins();

//- Load config into variable
let args = minimist(process.argv.slice(2));
let config = Object.assign({}, pjson.config);
let target = args.dev ? config.directories.temporary : config.directories.build;

//- Load all gulp tasks
let tasks = fs.readdirSync('./gulp');
for (let file of tasks) {
  if ((/\.(js)$/i).test(file)) {
    plugins.util.log(
      'Requiring ' + plugins.util.colors.magenta(file.split('.').shift().toUpperCase()) + ' task module.'
    );
    require(`./gulp/${file}`)(gulp, args, plugins, config, target);
  }
}

gulp.task('default', ['clean'], () => {
   gulp.start('build');
});

// Build production-ready code
gulp.task('build', [
  'less',
  'pug'
]);

// serve, watch, share<commit_msg>Added browserfy task to build process.<commit_after>'use strict';

import fs from 'fs';
import gulp from 'gulp';
import debug from 'gulp-debug';
import pjson from './package.json';
import minimist from 'minimist';

//- Import all gulp-* based plugins
import gulpLoadPlugins from 'gulp-load-plugins';
const plugins = gulpLoadPlugins();

//- Load config into variable
let args = minimist(process.argv.slice(2));
let config = Object.assign({}, pjson.config);
let target = args.dev ? config.directories.temporary : config.directories.build;

//- Load all gulp tasks
let tasks = fs.readdirSync('./gulp');
for (let file of tasks) {
  if ((/\.(js)$/i).test(file)) {
    plugins.util.log(
      'Requiring ' + plugins.util.colors.magenta(file.split('.').shift().toUpperCase()) + ' task module.'
    );
    require(`./gulp/${file}`)(gulp, args, plugins, config, target);
  }
}

gulp.task('default', ['clean'], () => {
   gulp.start('build');
});

// Build production-ready code
gulp.task('build', [
  'less',
  'pug',
  'browserify'
]);

// serve, watch, share
{'fraction_non_alphanumeric': 0.18728772440562833, 'fraction_numerical': 0.0009704027171276079, 'mean_word_length': 3.9806763285024154, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7274028', 'n_tokens_mistral': 689, 'n_tokens_neox': 694, 'n_words': 177}