<commit_before>/*eslint-env node*/
"use strict";

/*****************
 * Configuration *
 *****************/
var config = {
  sourceFolder: "src", // dossier source
  devFolder: "serve", // dossier pour le serveur local
  prodFolder: "prod", // dossier de build :)

  uncss: {
    html: ["src/index.html"], // have to fix?
    ignore: [
      ".city",
      ".content",
      ".geo",
      ".geoJson",
      ".headmasked",
      ".hidden",
      ".nohead",
      ".on",
      ".textnote",
      ".type",
      "li",
      "ul",
      /input/,
      /leaflet-/,
      /note/,
      /photon-/,
      /reverse-/,
      /zmdi/
    ]
  },
  colorguard: {
    logOk: true,
    threshold: 3,
    whitelist: []
  }
};

/************
 * Includes *
 ************/
var gulp = require("gulp");
var $ = require("gulp-load-plugins")(); // auto load :)
// Permet de supprimer les dossier de destination
var del = require("del"); // ce n'est pas un plugin Gulp.
//var argv = require("minimist")(process.argv.slice(2));

// Idem, on doit le charger manuellement.
var browserSync = require("browser-sync");
var reload = browserSync.reload; // on met la commande dans une variable locale

/* eslint-disable no-unused-vars */
var bs; // voir plus loin :)
/* eslint-enable no-unused-vars */

var imageminZopfli = require("imagemin-zopfli");

/*********
 * Tasks *
 *********/
// Deletes the directory that is used to serve the site during development
gulp.task("clean:dev", del.bind(null, [config.devFolder]));

// Deletes the directory that the optimized site is output to
gulp.task("clean:prod", del.bind(null, [config.prodFolder]));

// SCSS-Lint
gulp.task("scss-lint", function() {
  gulp.src(config.sourceFolder + "/scss/style.scss")
    .pipe($.scssLint());
});

// SCSS
gulp.task("SCSS", function() {
  gulp.src(config.sourceFolder + "/scss/style.scss")
    //  .pipe($.sourcemaps.init()) //useless ?
    .pipe($.scss())
    .pipe($.concat("style.css"))
    // AutoPrefix your CSS so it works between browsers
    .pipe($.autoprefixer("> 5%, last 2 versions, Firefox ESR", {
      cascade: true
    }))
    .pipe($.uncss(config.uncss))
    .pipe($.colorguard(config.colorguard))
    .pipe(gulp.dest(config.sourceFolder + "/css"))
    .pipe(gulp.dest(config.devFolder + "/css"))
    // Outputs the size of the CSS file
    .pipe($.size({
      title: "styles"
    }))
    // Injects the CSS changes to your browser since Jekyll doesn't rebuild the CSS
    .pipe(reload({
      stream: true
    }));
});

// HTML Lint
gulp.task("htmllint", function() {
  gulp.src("./src/*.html")
    .pipe($.htmlhint())
    .pipe($.htmlhint.reporter());
});

// Run JS Lint against your JS
gulp.task("jslint", function() {
  gulp.src(config.sourceFolder + "/js/*.js")<commit_msg>Updating Bower & NPM<commit_after>/*eslint-env node*/
"use strict";

/*****************
 * Configuration *
 *****************/
var config = {
  sourceFolder: "src", // dossier source
  devFolder: "serve", // dossier pour le serveur local
  prodFolder: "prod", // dossier de build :)

  uncss: {
    html: ["src/index.html"], // have to fix?
    ignore: [
      ".city",
      ".content",
      ".geo",
      ".geoJson",
      ".headmasked",
      ".hidden",
      ".nohead",
      ".on",
      ".textnote",
      ".type",
      "li",
      "ul",
      /input/,
      /leaflet-/,
      /note/,
      /photon-/,
      /reverse-/,
      /zmdi/
    ]
  },
  colorguard: {
    logOk: true,
    threshold: 3,
    whitelist: []
  }
};

/************
 * Includes *
 ************/
var gulp = require("gulp");
var $ = require("gulp-load-plugins")(); // auto load :)
// Permet de supprimer les dossier de destination
var del = require("del"); // ce n'est pas un plugin Gulp.
//var argv = require("minimist")(process.argv.slice(2));

// Idem, on doit le charger manuellement.
var browserSync = require("browser-sync");
var reload = browserSync.reload; // on met la commande dans une variable locale

/* eslint-disable no-unused-vars */
var bs; // voir plus loin :)
/* eslint-enable no-unused-vars */

var imageminZopfli = require("imagemin-zopfli");

/*********
 * Tasks *
 *********/
// Deletes the directory that is used to serve the site during development
gulp.task("clean:dev", del.bind(null, [config.devFolder]));

// Deletes the directory that the optimized site is output to
gulp.task("clean:prod", del.bind(null, [config.prodFolder]));

// SCSS-Lint
gulp.task("scss-lint", function() {
  gulp.src(config.sourceFolder + "/scss/style.scss")
    .pipe($.scssLint());
});

// SCSS
gulp.task("SCSS", function() {
  gulp.src(config.sourceFolder + "/scss/style.scss")
    //  .pipe($.sourcemaps.init()) //useless ?
    .pipe($.scss())
    .pipe($.concat("style.css"))
    // AutoPrefix your CSS so it works between browsers
    .pipe($.autoprefixer({
      cascade: true
    }))
    .pipe($.uncss(config.uncss))
    .pipe($.colorguard(config.colorguard))
    .pipe(gulp.dest(config.sourceFolder + "/css"))
    .pipe(gulp.dest(config.devFolder + "/css"))
    // Outputs the size of the CSS file
    .pipe($.size({
      title: "styles"
    }))
    // Injects the CSS changes to your browser since Jekyll doesn't rebuild the CSS
    .pipe(reload({
      stream: true
    }));
});

// HTML Lint
gulp.task("htmllint", function() {
  gulp.src("./src/*.html")
    .pipe($.htmlhint())
    .pipe($.htmlhint.reporter());
});

// Run JS Lint against your JS
gulp.task("jslint", function() {
  gulp.src(config.sourceFolder + "/js/*.js")
{'fraction_non_alphanumeric': 0.2072880424830617, 'fraction_numerical': 0.0010986998718183483, 'mean_word_length': 2.759119064005506, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '166614', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1867, 'n_words': 441}