<commit_before>argv = require("yargs").argv
browserSync = require "browser-sync"
cache = require "gulp-cached"
coffee = require "gulp-coffee"
dateFormat = require "dateformat"
del = require "del"
ghPages = require "gulp-gh-pages"
gulp = require "gulp"
gutil = require "gulp-util"
include = require "gulp-include"
literate = require "gulp-writ"
mediaQueries = require "gulp-combine-media-queries"
minifyCSS = require "gulp-minify-css"
minifyJS = require "gulp-uglify"
prefix = require "gulp-autoprefixer"
removeEmptyLines = require "gulp-remove-empty-lines"
rename = require "gulp-rename"
replace = require "gulp-replace"
runSequence = require "run-sequence"
run = require "gulp-run"
sass = require "gulp-sass"
scssLint = require "gulp-scss-lint"
slugify = require "underscore.string/slugify"
uncss = require "gulp-uncss"

now = new Date()
title = argv.t ? "Untitled"
dashedTitle = slugify(title)
messages =
  jekyllBuild: "Rebuilding Jekyll..."
  swiftSuccess: "\u2705  Swift compiled sucessfully!"
  uncssSuccess: "\u2705  CSS cleaned sucessfully!"
  uncssStart: "Cleaning CSS..."

sourceFolder = "."
destinationFolder = "./_site"

paths =
  sass: "#{sourceFolder}/_scss/"
  coffee: "#{sourceFolder}/_coffee/"
  styles: "#{sourceFolder}/css/"
  destinationStyles: "#{destinationFolder}/css/"
  scripts: "#{sourceFolder}/scripts/"
  destinationScripts: "#{destinationFolder}/scripts/"
  jekyllFiles: [
    "#{sourceFolder}/**/*.html",
    "#{sourceFolder}/**/*.md",
    "#{sourceFolder}/**/*.yml",
    "#{sourceFolder}/**/*.xml",
    "!#{sourceFolder}/node_modules/**/*",
    "!#{destinationFolder}/**/*"
  ]

gulp.task "default", ["develop"]

gulp.task "develop", ->
  runSequence "watch", "browser-sync"

gulp.task "swift", ->
  runSequence "generate-swift", "run-swift"

gulp.task "build", ->
  runSequence "lint-scss", "swift", "uncss", "jekyll-build"

gulp.task "clean",
  del.bind(null, ["_site"])

gulp.task "watch", ["sass", "coffee", "vendor-js", "jekyll-build-local"], ->
  gulp.watch "#{paths.sass}/**/*.scss", ["sass"]
  gulp.watch "#{paths.coffee}/**/*.coffee", ["coffee"]
  gulp.watch "#{paths.coffee}/vendor.js", ["vendor-js"]
  gulp.watch paths.jekyllFiles, ["jekyll-reload"]

gulp.task "jekyll-build-local", ->
  run "bundle exec jekyll build --config _config.yml,_config.serve.yml", silent: true
    .exec()
  browserSync.notify messages.jekyllBuild

gulp.task "jekyll-build", ->
  run "bundle exec jekyll build", silent: true
    .exec()

gulp.task "jekyll-reload", ["jekyll-build-local"], ->
  browserSync.reload()

gulp.task "doctor", ->
  run "jekyll doctor"
    .exec()

gulp.task "sass", ->
  gulp.src "#{paths.sass}/*.scss"
    .pipe sass
      errLogToConsole: true
      precision: 2
    .pipe prefix ["last 2 versions", "> 2%", "ie 11", "Firefox ESR"], cascade: false
    .pipe mediaQueries()
    .pipe cache paths.styles
    .pipe minifyCSS()
    .pipe gulp.dest(paths.destinationStyles)
    .pipe gulp.dest(paths.styles)
    .pipe browserSync.reload(stream: true)<commit_msg>Update reload task<commit_after>argv = require("yargs").argv
browserSync = require "browser-sync"
cache = require "gulp-cached"
coffee = require "gulp-coffee"
dateFormat = require "dateformat"
del = require "del"
ghPages = require "gulp-gh-pages"
gulp = require "gulp"
gutil = require "gulp-util"
include = require "gulp-include"
literate = require "gulp-writ"
mediaQueries = require "gulp-combine-media-queries"
minifyCSS = require "gulp-minify-css"
minifyJS = require "gulp-uglify"
prefix = require "gulp-autoprefixer"
removeEmptyLines = require "gulp-remove-empty-lines"
rename = require "gulp-rename"
replace = require "gulp-replace"
runSequence = require "run-sequence"
run = require "gulp-run"
sass = require "gulp-sass"
scssLint = require "gulp-scss-lint"
slugify = require "underscore.string/slugify"
uncss = require "gulp-uncss"

now = new Date()
title = argv.t ? "Untitled"
dashedTitle = slugify(title)
messages =
  jekyllBuild: "Rebuilding Jekyll..."
  swiftSuccess: "\u2705  Swift compiled sucessfully!"
  uncssSuccess: "\u2705  CSS cleaned sucessfully!"
  uncssStart: "Cleaning CSS..."

sourceFolder = "."
destinationFolder = "./_site"

paths =
  sass: "#{sourceFolder}/_scss/"
  coffee: "#{sourceFolder}/_coffee/"
  styles: "#{sourceFolder}/css/"
  destinationStyles: "#{destinationFolder}/css/"
  scripts: "#{sourceFolder}/scripts/"
  destinationScripts: "#{destinationFolder}/scripts/"
  jekyllFiles: [
    "#{sourceFolder}/**/*.html",
    "#{sourceFolder}/**/*.md",
    "#{sourceFolder}/**/*.yml",
    "#{sourceFolder}/**/*.xml",
    "!#{sourceFolder}/node_modules/**/*",
    "!#{destinationFolder}/**/*"
  ]

gulp.task "default", ["develop"]

gulp.task "develop", ->
  runSequence "watch", "browser-sync"

gulp.task "swift", ->
  runSequence "generate-swift", "run-swift"

gulp.task "build", ->
  runSequence "lint-scss", "swift", "uncss", "jekyll-build"

gulp.task "rebuild", ->
  runSequence "jekyll-build-local", "reload"

gulp.task "clean",
  del.bind(null, ["_site"])

gulp.task "watch", ["sass", "coffee", "vendor-js", "jekyll-build-local"], ->
  gulp.watch "#{paths.sass}/**/*.scss", ["sass"]
  gulp.watch "#{paths.coffee}/**/*.coffee", ["coffee"]
  gulp.watch "#{paths.coffee}/vendor.js", ["vendor-js"]
  gulp.watch paths.jekyllFiles, ["rebuild"]

gulp.task "jekyll-build-local", ->
  run "bundle exec jekyll build --config _config.yml,_config.serve.yml", silent: true
    .exec()

gulp.task "jekyll-build", ->
  run "bundle exec jekyll build", silent: true
    .exec()

gulp.task "reload", ->
  browserSync.reload()

gulp.task "doctor", ->
  run "jekyll doctor"
    .exec()

gulp.task "sass", ->
  gulp.src "#{paths.sass}/*.scss"
    .pipe sass
      errLogToConsole: true
      precision: 2
    .pipe prefix ["last 2 versions", "> 2%", "ie 11", "Firefox ESR"], cascade: false
    .pipe mediaQueries()
    .pipe cache paths.styles
    .pipe minifyCSS()
    .pipe gulp.dest(paths.destinationStyles)
    .pipe gulp.dest(paths.styles)
    .pipe browserSync.reload(stream: true)
{'fraction_non_alphanumeric': 0.18148518148518147, 'fraction_numerical': 0.004329004329004329, 'mean_word_length': 4.200865800865801, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5237669', 'n_tokens_mistral': 2196, 'n_tokens_neox': 2147, 'n_words': 465}