<commit_before>'use strict';

var browserSync = require('browser-sync').create();
var colorguard  = require('gulp-colorguard');
var csscomb     = require('gulp-csscomb');
var dateTime    = require('@radioactivehamster/date-time');
var fs          = require('fs');
var gulp        = require('gulp');
var htmltidy    = require('gulp-htmltidy');
var yaml        = require('js-yaml');
var less        = require('gulp-less');
var pkg         = require('./package.json');
var stachio     = require('gulp-stachio');

gulp.task('serve', ['style', 'template'], () => {
    browserSync.init({
        open: false,
        server: { baseDir: './' }
    });
    gulp.watch('./src/**/*.*', ['style', 'template']).on('change', browserSync.reload);
});

gulp.task('style', () => {
    return gulp.src('./src/style/main.less')
        .pipe(less())
        .pipe(csscomb())
        /**
         * @todo Correct the color conflict with "links.css."
         */
        .pipe(colorguard().on('error', e => console.warn(e.message)))
        .pipe(gulp.dest('./'));
});

gulp.task('template', () => {
    /**
     * Remove angle bracket enclosed email addresses.
     * @todo Look into potential "safe string" encoding issues in `stachio`.
     */
    let author     = pkg.author.replace(/ <.+>/i, '');
    let cname      = fs.readFileSync('./CNAME').toString().trim();
    let htmltidyrc = yaml.load(fs.readFileSync('./.htmltidyrc').toString());
    let vcard      = fs.readFileSync('./data/me/vcard.jsonld').toString().trim();

    return gulp.src('./src/template/**/*.hbs')
        .pipe(stachio({ author: author, cname: cname, timestamp: dateTime(), vcard: vcard }))
        .pipe(htmltidy(htmltidyrc))
        .pipe(gulp.dest('./'));
});

gulp.task('default', ['style', 'template']);<commit_msg>Changed the package includes to constants.<commit_after>'use strict';

const browserSync = require('browser-sync').create();
const colorguard  = require('gulp-colorguard');
const csscomb     = require('gulp-csscomb');
const dateTime    = require('@radioactivehamster/date-time');
const fs          = require('fs');
const gulp        = require('gulp');
const htmltidy    = require('gulp-htmltidy');
const yaml        = require('js-yaml');
const less        = require('gulp-less');
const pkg         = require('./package.json');
const stachio     = require('gulp-stachio');

gulp.task('serve', ['style', 'template'], () => {
    browserSync.init({
        open: false,
        server: { baseDir: './' }
    });
    gulp.watch('./src/**/*.*', ['style', 'template']).on('change', browserSync.reload);
});

gulp.task('style', () => {
    return gulp.src('./src/style/main.less')
        .pipe(less())
        .pipe(csscomb())
        /**
         * @todo Correct the color conflict with "links.css."
         */
        .pipe(colorguard().on('error', e => console.error(e.message)))
        .pipe(gulp.dest('./'));
});

gulp.task('template', () => {
    /**
     * Remove angle bracket enclosed email addresses.
     * @todo Look into potential "safe string" encoding issues in `stachio`.
     */
    let author     = pkg.author.replace(/ <.+>/i, '');
    let cname      = fs.readFileSync('./CNAME').toString().trim();
    let htmltidyrc = yaml.load(fs.readFileSync('./.htmltidyrc').toString());
    let vcard      = fs.readFileSync('./data/me/vcard.jsonld').toString().trim();

    return gulp.src('./src/template/**/*.hbs')
        .pipe(stachio({ author: author, cname: cname, timestamp: dateTime(), vcard: vcard }))
        .pipe(htmltidy(htmltidyrc))
        .pipe(gulp.dest('./'));
});

gulp.task('default', ['style', 'template']);
{'fraction_non_alphanumeric': 0.20957918050941307, 'fraction_numerical': 0.0, 'mean_word_length': 2.8641711229946525, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '5065353', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1143, 'n_words': 222}