<commit_before>var gulp         = require('gulp'),
    autoprefixer = require('gulp-autoprefixer'),
    browserSync  = require('browser-sync').create(),
    htmlmin      = require('gulp-htmlmin'),
    nunjucks     = require('gulp-nunjucks-render'),
    sass         = require('gulp-sass'),
    sourcemaps   = require('gulp-sourcemaps'),
    projectData  = require('./source/data/projects.json');

gulp.task('build-html', function() {
  return gulp.src('source/html/*.html')
    .pipe(nunjucks({
      data: projectData
    }))
    .pipe(htmlmin({
      collapseBooleanAttributes: true,
      collapseWhitespace: true,
      conservativeCollapse: true, // required for browser-sync to work
      decodeEntities: true,
      includeAutoGeneratedTags: false,
      minifyCSS: true,
      minifyJS: true,
      processConditionalComments: true,
      processScripts: ['text/html'],
      quoteCharacter: '"',
      removeComments: true,
      removeEmptyAttributes: true,
      removeRedundantAttributes: true,
      removeScriptTypeAttributes: true,
      removeStyleLinkTypeAttributes: true,
      useShortDoctype: true
    }))
    .pipe(gulp.dest('public'));
});

gulp.task('build-css', function() {
  return gulp.src('source/scss/*.scss')
    .pipe(sourcemaps.init())
    .pipe(sass({
      outputStyle: 'compressed'
    }).on('error', sass.logError))
    .pipe(autoprefixer())
    .pipe(sourcemaps.write('./sourcemaps'))
    .pipe(gulp.dest('public/assets/stylesheets'));
});<commit_msg>Allow live reloading of projects data<commit_after>var gulp         = require('gulp'),
    autoprefixer = require('gulp-autoprefixer'),
    browserSync  = require('browser-sync').create(),
    fs           = require('fs'),
    htmlmin      = require('gulp-htmlmin'),
    nunjucks     = require('gulp-nunjucks-render'),
    sass         = require('gulp-sass'),
    sourcemaps   = require('gulp-sourcemaps');

gulp.task('build-html', function() {
  var projectData = JSON.parse(fs.readFileSync('./source/data/projects.json'));
  return gulp.src('source/html/*.html')
    .pipe(nunjucks({ data: projectData }))
    .pipe(htmlmin({
      collapseBooleanAttributes: true,
      collapseWhitespace: true,
      conservativeCollapse: true, // required for browser-sync to work
      decodeEntities: true,
      includeAutoGeneratedTags: false,
      minifyCSS: true,
      minifyJS: true,
      processConditionalComments: true,
      processScripts: ['text/html'],
      quoteCharacter: '"',
      removeComments: true,
      removeEmptyAttributes: true,
      removeRedundantAttributes: true,
      removeScriptTypeAttributes: true,
      removeStyleLinkTypeAttributes: true,
      useShortDoctype: true
    }))
    .pipe(gulp.dest('public'));
});

gulp.task('build-css', function() {
  return gulp.src('source/scss/*.scss')
    .pipe(sourcemaps.init())
    .pipe(sass({
      outputStyle: 'compressed'
    }).on('error', sass.logError))
    .pipe(autoprefixer())
    .pipe(sourcemaps.write('./sourcemaps'))
    .pipe(gulp.dest('public/assets/stylesheets'));
});
{'fraction_non_alphanumeric': 0.1497536945812808, 'fraction_numerical': 0.0, 'mean_word_length': 3.2482566248256624, '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': '3651152', 'n_tokens_mistral': 944, 'n_tokens_neox': 944, 'n_words': 158}