<commit_before>var concat = require('gulp-concat');
var connect = require('gulp-connect');
var footer = require('gulp-footer');
var fs = require('fs');
var gulp = require('gulp');
var header = require('gulp-header');
var marked = require('gulp-marked');
var rename = require('gulp-rename');
var sort = require('sort-stream');

var paths = {
  'docs': 'docs/*.md',
  'pages': './*.md',
  'blog': 'blog/*.md',
  'site': ['header.html', 'footer.html']
};

gulp.task('build', ['docs', 'pages', 'blog']);

gulp.task('docs', function () {
  var content = {
    footer: fs.readFileSync('footer.html'),
    header: fs.readFileSync('header.html')
  };
  gulp.src(paths.docs)
    .pipe(marked())
    .pipe(rename(function (path) {
      path.extname = '.html';
    }))
    .pipe(header(content.header))
    .pipe(footer(content.footer))
    .pipe(gulp.dest('docs'));
});

gulp.task('pages', function () {
  var content = {
    footer: fs.readFileSync('footer.html'),
    header: fs.readFileSync('header.html')
  };
  gulp.src(paths.pages)
    .pipe(marked())
    .pipe(rename(function (path) {
      path.extname = '.html';
    }))
    .pipe(header(content.header))
    .pipe(footer(content.footer))
    .pipe(gulp.dest('.'));
});

gulp.task('blog', function () {
  var content = {
    footer: fs.readFileSync('footer.html'),
    header: fs.readFileSync('header.html')
  };

  gulp.src(paths.blog)
    .pipe(sort(function (a, b) {
      return a.path < b.path;
    }))
    .pipe(marked())
    .pipe(rename(function (path) {
      path.extname = '.html';
    }))
    .pipe(header('<section>'))
    .pipe(footer('</section>'))
    .pipe(concat('index.html'))
    .pipe(header(content.header))
    .pipe(footer(content.footer))
    .pipe(gulp.dest('blog'));
});

gulp.task('connect', function() {
  connect.server({
    port: 3001
  });
});

gulp.task('watch', function() {
  gulp.watch([paths.docs, paths.blog, paths.site], ['build']);
});

gulp.task('server', ['build', 'connect', 'watch']);<commit_msg>Add a default gulp task (`gulp serve`)<commit_after>var concat = require('gulp-concat');
var connect = require('gulp-connect');
var footer = require('gulp-footer');
var fs = require('fs');
var gulp = require('gulp');
var header = require('gulp-header');
var marked = require('gulp-marked');
var rename = require('gulp-rename');
var sort = require('sort-stream');

var paths = {
  'docs': 'docs/*.md',
  'pages': './*.md',
  'blog': 'blog/*.md',
  'site': ['header.html', 'footer.html']
};

gulp.task('build', ['docs', 'pages', 'blog']);

gulp.task('docs', function () {
  var content = {
    footer: fs.readFileSync('footer.html'),
    header: fs.readFileSync('header.html')
  };
  gulp.src(paths.docs)
    .pipe(marked())
    .pipe(rename(function (path) {
      path.extname = '.html';
    }))
    .pipe(header(content.header))
    .pipe(footer(content.footer))
    .pipe(gulp.dest('docs'));
});

gulp.task('pages', function () {
  var content = {
    footer: fs.readFileSync('footer.html'),
    header: fs.readFileSync('header.html')
  };
  gulp.src(paths.pages)
    .pipe(marked())
    .pipe(rename(function (path) {
      path.extname = '.html';
    }))
    .pipe(header(content.header))
    .pipe(footer(content.footer))
    .pipe(gulp.dest('.'));
});

gulp.task('blog', function () {
  var content = {
    footer: fs.readFileSync('footer.html'),
    header: fs.readFileSync('header.html')
  };

  gulp.src(paths.blog)
    .pipe(sort(function (a, b) {
      return a.path < b.path;
    }))
    .pipe(marked())
    .pipe(rename(function (path) {
      path.extname = '.html';
    }))
    .pipe(header('<section>'))
    .pipe(footer('</section>'))
    .pipe(concat('index.html'))
    .pipe(header(content.header))
    .pipe(footer(content.footer))
    .pipe(gulp.dest('blog'));
});

gulp.task('connect', function() {
  connect.server({
    port: 3001
  });
});

gulp.task('watch', function() {
  gulp.watch([paths.docs, paths.blog, paths.site], ['build']);
});

gulp.task('server', ['build', 'connect', 'watch']);

gulp.task('default', ['server']);
{'fraction_non_alphanumeric': 0.22823936696340258, 'fraction_numerical': 0.0019782393669634025, 'mean_word_length': 3.6123147092360317, 'pattern_counts': {'":': 0, '<': 9, '<?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': '7336256', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1434, 'n_words': 241}