<commit_before>// Load all plugins from the package.json file
var pkg = require("./package.json"),
    gulp = require("gulp"),
    gulpSequence = require("gulp-sequence"),
    critical = require("critical").stream,
    fs = require("fs"),
    ftp = require("vinyl-ftp"),
    path = require("path"),
    $ = require("gulp-load-plugins")({
      pattern: ["*"],
      scope: ["devDependencies"]
    }),
    image,
    onError = function(err) {
      $.notify.onError({
        title: "No: <%= error.plugin %> for you!",
        message: "On line: <%= error.line %> in file: <%= error.message %>",
        sound: "Pop",
        appIcon: image,
        icon: image,
        wait: true
      })(err);
    };

// Concat and uglify JS
gulp.task("js", function() {
  $.fancyLog("-> Compiling JS");
  image = path.join(__dirname, pkg.paths.error + "js.png");
  return gulp.src(pkg.paths.assets.js_main + "*.js")
    .pipe($.plumber({errorHandler: onError}))
    .pipe($.sourcemaps.init())
    .pipe($.concat(pkg.vars.js))
    .pipe($.uglify())
    .pipe($.sourcemaps.write("."))
    .pipe($.size({gzip: true, showFiles: false}))
    .pipe(gulp.dest(pkg.paths.build.js))
    .pipe($.browserSync.reload({ stream: true })
  );
});

gulp.task("vendors", function() {
  $.fancyLog("-> Compiling JS vendors");
  image = path.join(__dirname, pkg.paths.error + "vendors.png");
  return gulp.src(pkg.paths.assets.js_vendors + "*.js")
    .pipe($.plumber({errorHandler: onError}))
    .pipe($.concat(pkg.vars.vendors))
    .pipe($.uglify())
    .pipe($.size({gzip: true, showFiles: true}))
    .pipe(gulp.dest(pkg.paths.build.js))
    .pipe($.browserSync.reload({ stream: true })
  );
});

// SASS, autoprefix CSS & minify CSS
gulp.task("css", function(){
  $.fancyLog("-> Compiling SCSS to CSS");
  image = path.join(__dirname, pkg.paths.error + "sass.png");
  return gulp.src(pkg.paths.assets.sass + pkg.vars.sass)
    .pipe($.plumber({errorHandler: onError}))
    .pipe($.sourcemaps.init())
    .pipe($.sass({
      style: "compressed",
      errLogToConsole: false,
      onError: function(err) {
        return $.notify().write(err);
      }
    }))
    .pipe($.cached("sass_compile"))
    .pipe($.autoprefixer({browsers: ["last 2 versions", "ie >= 8", "Firefox ESR"]}))
    .pipe($.cssnano({
      discardComments: {
        removeAll: true
      },
      discardDuplicates: true,
      discardEmpty: true,
      minifyFontValues: true,
      minifySelectors: true
    }))
    .pipe($.size({gzip: true, showFiles: true}))
    .pipe($.sourcemaps.write("."))
    .pipe($.rename(pkg.vars.css))
    .pipe(gulp.dest(pkg.paths.build.css))
    .pipe($.browserSync.reload({ stream: true })
  );
});

// Compile Pug
gulp.task("pug", function(){
  $.fancyLog("-> Compiling PUG to HTML");
  image = path.join(__dirname, pkg.paths.error + "pug.png");
  return gulp.src([pkg.paths.assets.pug + "**/*.pug", !pkg.paths.assets.pug + "_template/**/*.pug"])<commit_msg>Removed sourcemapping from gulpfile<commit_after>// Load all plugins from the package.json file
var pkg = require("./package.json"),
    gulp = require("gulp"),
    gulpSequence = require("gulp-sequence"),
    critical = require("critical").stream,
    fs = require("fs"),
    ftp = require("vinyl-ftp"),
    path = require("path"),
    $ = require("gulp-load-plugins")({
      pattern: ["*"],
      scope: ["devDependencies"]
    }),
    image,
    onError = function(err) {
      $.notify.onError({
        title: "No: <%= error.plugin %> for you!",
        message: "On line: <%= error.line %> in file: <%= error.message %>",
        sound: "Pop",
        appIcon: image,
        icon: image,
        wait: true
      })(err);
    };

// Concat and uglify JS
gulp.task("js", function() {
  $.fancyLog("-> Compiling JS");
  image = path.join(__dirname, pkg.paths.error + "js.png");
  return gulp.src(pkg.paths.assets.js_main + "*.js")
    .pipe($.plumber({errorHandler: onError}))
    .pipe($.concat(pkg.vars.js))
    .pipe($.uglify())
    .pipe($.size({gzip: true, showFiles: false}))
    .pipe(gulp.dest(pkg.paths.build.js))
    .pipe($.browserSync.reload({ stream: true })
  );
});

gulp.task("vendors", function() {
  $.fancyLog("-> Compiling JS vendors");
  image = path.join(__dirname, pkg.paths.error + "vendors.png");
  return gulp.src(pkg.paths.assets.js_vendors + "*.js")
    .pipe($.plumber({errorHandler: onError}))
    .pipe($.concat(pkg.vars.vendors))
    .pipe($.uglify())
    .pipe($.size({gzip: true, showFiles: true}))
    .pipe(gulp.dest(pkg.paths.build.js))
    .pipe($.browserSync.reload({ stream: true })
  );
});

// SASS, autoprefix CSS & minify CSS
gulp.task("css", function(){
  $.fancyLog("-> Compiling SCSS to CSS");
  image = path.join(__dirname, pkg.paths.error + "sass.png");
  return gulp.src(pkg.paths.assets.sass + pkg.vars.sass)
    .pipe($.plumber({errorHandler: onError}))
    .pipe($.sass({
      style: "compressed",
      errLogToConsole: false,
      onError: function(err) {
        return $.notify().write(err);
      }
    }))
    .pipe($.cached("sass_compile"))
    .pipe($.autoprefixer({browsers: ["last 2 versions", "ie >= 8", "Firefox ESR"]}))
    .pipe($.cssnano({
      discardComments: {
        removeAll: true
      },
      discardDuplicates: true,
      discardEmpty: true,
      minifyFontValues: true,
      minifySelectors: true
    }))
    .pipe($.size({gzip: true, showFiles: true}))
    .pipe($.rename(pkg.vars.css))
    .pipe(gulp.dest(pkg.paths.build.css))
    .pipe($.browserSync.reload({ stream: true })
  );
});

// Compile Pug
gulp.task("pug", function(){
  $.fancyLog("-> Compiling PUG to HTML");
  image = path.join(__dirname, pkg.paths.error + "pug.png");
  return gulp.src([pkg.paths.assets.pug + "**/*.pug", !pkg.paths.assets.pug + "_template/**/*.pug"])
{'fraction_non_alphanumeric': 0.20742282344779744, 'fraction_numerical': 0.000693721817551162, 'mean_word_length': 3.038515406162465, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '1138955', 'n_tokens_mistral': 2072, 'n_tokens_neox': 2027, 'n_words': 372}