<commit_before>"use strict"

var gulp = require("gulp")
  , $ = require("gulp-load-plugins")()
  , del = require("del")

gulp.task("css", ["css:clean"], function () {
})

gulp.task("css:clean", function (done) {
  del(["dist/css"], done)
})

gulp.task("js", ["js:clean"], function () {
})

gulp.task("js:clean", function (done) {
  del(["dist/js"], done)
})

gulp.task("img", ["img:clean"], function () {
  return gulp.src("img/**")
    .pipe($.plumber())
    .pipe($.changed("dist/img"))
    .pipe(gulp.dest("dist/img"))
    .pipe($.size({
      title: "img"
    , showFiles: true
    }))
})

gulp.task("img:clean", function (done) {
  del(["dist/img"], done)
})

gulp.task("html", ["html:clean"], function () {
  var gulpsmith = require("gulpsmith")
    , _ = require("lodash")
    , $$ = require("load-metalsmith-plugins")()

  return gulp.src("html/**/*.{md,html}")
    .pipe($.plumber())
    .pipe($.frontMatter().on("data", function (file) {
      _.assign(file, file.frontMatter)
    }))
    .pipe(gulpsmith()
      .use($$.markdown())
      .use($$.permalinks(":title"))
      .use($$.templates({
        engine: "ejs"
      , directory: "tpl"
      }))
    )
    .pipe($.minifyHtml())
    .pipe(gulp.dest("dist"))
    .pipe($.livereload())
    .pipe($.size({
      title: "html"
    , showFiles: true
    }))
})

gulp.task("html:clean", function (done) {
  del(["dist/**/*.html"], done)
})

gulp.task("copy", function () {
  return gulp.src([
    "favicon.ico"
  ], {
    base: "./"
  })
    .pipe($.plumber())
    .pipe($.changed("dist"))
    .pipe(gulp.dest("dist"))
})

gulp.task("build", [
  "css"
, "js"
, "img"
, "html"
, "copy"
])

gulp.task("default", ["build"])

gulp.task("watch", ["build"], function () {
  $.livereload.listen()

  gulp.watch("css/**/*.css", ["css"])
  gulp.watch("js/**/*.js", ["js"])
  gulp.watch([
    "tpl/**/*.html"
  , "html/**/*.{md,html}"
  ], ["html"])
})

gulp.task("serve", ["watch"], function () {
  return gulp.src("dist")
    .pipe($.plumber())
    .pipe($.webserver({
      open: true
    , livereload: true
    }))
})

gulp.task("deploy", ["deploy:clean", "build"], function () {
  return gulp.src("dist/**/*")
    .pipe($.plumber())
    .pipe($.ghPages({
      remoteUrl: "<EMAIL>:radio-modem/radio-modem.github.io.git"
    , branch: "master"
    , cacheDir: ".tmp"
    }))
})

gulp.task("deploy:clean", function (done) {
  del([".tmp"], done)
})<commit_msg>Force push when deploying. http://i.imgur.com/zibprJd.png<commit_after>"use strict"

var gulp = require("gulp")
  , $ = require("gulp-load-plugins")()
  , del = require("del")

gulp.task("css", ["css:clean"], function () {
})

gulp.task("css:clean", function (done) {
  del(["dist/css"], done)
})

gulp.task("js", ["js:clean"], function () {
})

gulp.task("js:clean", function (done) {
  del(["dist/js"], done)
})

gulp.task("img", ["img:clean"], function () {
  return gulp.src("img/**")
    .pipe($.plumber())
    .pipe($.changed("dist/img"))
    .pipe(gulp.dest("dist/img"))
    .pipe($.size({
      title: "img"
    , showFiles: true
    }))
})

gulp.task("img:clean", function (done) {
  del(["dist/img"], done)
})

gulp.task("html", ["html:clean"], function () {
  var gulpsmith = require("gulpsmith")
    , _ = require("lodash")
    , $$ = require("load-metalsmith-plugins")()

  return gulp.src("html/**/*.{md,html}")
    .pipe($.plumber())
    .pipe($.frontMatter().on("data", function (file) {
      _.assign(file, file.frontMatter)
    }))
    .pipe(gulpsmith()
      .use($$.markdown())
      .use($$.permalinks(":title"))
      .use($$.templates({
        engine: "ejs"
      , directory: "tpl"
      }))
    )
    .pipe($.minifyHtml())
    .pipe(gulp.dest("dist"))
    .pipe($.livereload())
    .pipe($.size({
      title: "html"
    , showFiles: true
    }))
})

gulp.task("html:clean", function (done) {
  del(["dist/**/*.html"], done)
})

gulp.task("copy", function () {
  return gulp.src([
    "favicon.ico"
  ], {
    base: "./"
  })
    .pipe($.plumber())
    .pipe($.changed("dist"))
    .pipe(gulp.dest("dist"))
})

gulp.task("build", [
  "css"
, "js"
, "img"
, "html"
, "copy"
])

gulp.task("default", ["build"])

gulp.task("watch", ["build"], function () {
  $.livereload.listen()

  gulp.watch("css/**/*.css", ["css"])
  gulp.watch("js/**/*.js", ["js"])
  gulp.watch([
    "tpl/**/*.html"
  , "html/**/*.{md,html}"
  ], ["html"])
})

gulp.task("serve", ["watch"], function () {
  return gulp.src("dist")
    .pipe($.plumber())
    .pipe($.webserver({
      open: true
    , livereload: true
    }))
})

gulp.task("deploy", ["deploy:clean", "build"], function () {
  return gulp.src("dist/**/*")
    .pipe($.plumber())
    .pipe($.ghPages({
      remoteUrl: "<EMAIL>:radio-modem/radio-modem.github.io.git"
    , branch: "master"
    , cacheDir: ".tmp"
    , force: true
    }))
})

gulp.task("deploy:clean", function (done) {
  del([".tmp"], done)
})
{'fraction_non_alphanumeric': 0.26852230863692184, 'fraction_numerical': 0.0, 'mean_word_length': 3.1032745591939546, 'pattern_counts': {'":': 2, '<': 5, '<?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': '4061721', 'n_tokens_mistral': 1929, 'n_tokens_neox': 1887, 'n_words': 282}