<commit_before>var gulp     = require('gulp');
var $        = require('gulp-load-plugins')();
var mq       = require('media-query-extractor');
var rimraf   = require('rimraf');
var shipyard = require('shipyard');
var yargs    = require('yargs').argv;
var sequence = require('run-sequence');

// Look for the --production flag
var isProduction = !!(yargs.production);

// Delete the "dist" folder
// This happens every time a build starts
gulp.task('clean', function(done) {
  rimraf('../_build', done);
});

// Compile layouts, pages, and partials into flat HTML files
// Then parse using Inky templates
gulp.task('pages', function() {
  return gulp.src('./pages/**/*.html')
    .pipe(shipyard({
      layouts: './layouts'
    }))
    .pipe($.inky())
    .pipe(gulp.dest('../_build'));
});

// Compile Sass into CSS
gulp.task('sass', function() {
  return gulp.src('../scss/ink.scss')
    .pipe($.sass().on('error', $.sass.logError))
    .pipe(gulp.dest('../_build/css'));
});

// Inline CSS and minify HTML
gulp.task('inline', function() {
  // Extracts media query-specific CSS into a separate file
  mq('../_build/css/ink.css', '../_build/css/ink-mq.css');

  var inject = $.inject(gulp.src('../_build/css/ink-mq.css'), {
    transform: function(path, file) { return '<style>' + file.contents.toString(); + '</style>'; }
  });

  return gulp.src('../_build/*.html')
    .pipe($.inlineCss())
    .pipe(inject)
    // .pipe($.htmlmin())
    .pipe(gulp.dest('../_build'));
});

// Build the "dist" folder by running all of the above tasks
gulp.task('build', function(cb) {
  sequence('clean', ['pages', 'sass'], 'inline', cb);
});

// Build emails, run the server, and watch for file changes
gulp.task('default', ['build'], function() {
  gulp.watch('./pages/**/*.html', ['pages']);
  gulp.watch('../scss/**/*.scss', ['sass']);
});<commit_msg>Fix no closing style tag in inlined code<commit_after>var gulp     = require('gulp');
var $        = require('gulp-load-plugins')();
var mq       = require('media-query-extractor');
var rimraf   = require('rimraf');
var shipyard = require('shipyard');
var yargs    = require('yargs').argv;
var sequence = require('run-sequence');

// Look for the --production flag
var isProduction = !!(yargs.production);

// Delete the "dist" folder
// This happens every time a build starts
gulp.task('clean', function(done) {
  rimraf('../_build', done);
});

// Compile layouts, pages, and partials into flat HTML files
// Then parse using Inky templates
gulp.task('pages', function() {
  return gulp.src('./pages/**/*.html')
    .pipe(shipyard({
      layouts: './layouts'
    }))
    .pipe($.inky())
    .pipe(gulp.dest('../_build'));
});

// Compile Sass into CSS
gulp.task('sass', function() {
  return gulp.src('../scss/ink.scss')
    .pipe($.sass().on('error', $.sass.logError))
    .pipe(gulp.dest('../_build/css'));
});

// Inline CSS and minify HTML
gulp.task('inline', function() {
  // Extracts media query-specific CSS into a separate file
  mq('../_build/css/ink.css', '../_build/css/ink-mq.css');

  var inject = $.inject(gulp.src('../_build/css/ink-mq.css'), {
    transform: function(path, file) { return '<style>' + file.contents.toString() + '</style>'; }
  });

  return gulp.src('../_build/*.html')
    .pipe($.inlineCss())
    .pipe(inject)
    // .pipe($.htmlmin())
    .pipe(gulp.dest('../_build'));
});

// Build the "dist" folder by running all of the above tasks
gulp.task('build', function(cb) {
  sequence('clean', ['pages', 'sass'], 'inline', cb);
});

// Build emails, run the server, and watch for file changes
gulp.task('default', ['build'], function() {
  gulp.watch('./pages/**/*.html', ['pages']);
  gulp.watch('../scss/**/*.scss', ['sass']);
});
{'fraction_non_alphanumeric': 0.22494612068965517, 'fraction_numerical': 0.0, 'mean_word_length': 3.4307875894988067, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6464094', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1242, 'n_words': 297}