<commit_before> /*
  * m8tro-bootstrap
  * https://github.com/idleberg/m8tro-bootstrap
  *
  * Copyright (c) 2014 <NAME>
  * Licensed under the MIT license.
  */


// Read package.json metadata
var meta     = require('./package.json');

// Gulp plugins
var concat   = require('gulp-concat'),
    csslint  = require('gulp-csslint'),
    cssmin   = require('gulp-cssmin'),
    del      = require('del'),
    gulp     = require('gulp'),
    htmlval  = require('gulp-html-validator'),
    inject   = require('gulp-inject'),
    jshint   = require('gulp-jshint'),
    less     = require('gulp-less'),
    path     = require('path'),
    prompt   = require('gulp-prompt'),
    sequence = require('run-sequence'),
    util     = require('gulp-util'),
    uglify   = require('gulp-uglify'),
    watch    = require('gulp-watch');


/*
 * Task combos
 */
gulp.task('css',     ['csslint']);
gulp.task('html',    ['htmlval']);
gulp.task('js',      ['jshint']);
gulp.task('build',   ['setup']);
gulp.task('custom',  ['setup']);
gulp.task('make',    ['setup']);
gulp.task('prefs',   ['setup']);
gulp.task('clear',   ['clean']);
gulp.task('empty',   ['clean']);
gulp.task('flush',   ['clean']);
gulp.task('trash',   ['clean']);

gulp.task('default', ['help']);

gulp.task('lint',    ['css', 'html', 'js']);
gulp.task('travis',  ['css', 'html']);


/*
 * Sub-tasks
 */
 gulp.task('setup', ['clean'], function(callback) {

   console.log('\nBuilding M8tro theme:')
   sequence(
       ['fa_css', 'fa_fonts'],
       'bootstrapjs',
       'less',
       callback
     );
 });


// HTML Page
gulp.task('htmlval', function () {
  return htmlval([
        'index.html'
    ]);
});


// Custom CSS
gulp.task('csslint', function() {
  gulp.src([
      'dist/css/m8tro.css'
    ])
    .pipe(csslint())
    .pipe(csslint.reporter())
});


// Custom Javascript
gulp.task('jshint', function() {
  gulp.src([
      'dist/js/*'
    ])
    .pipe(jshint())
    .pipe(jshint.reporter())
});


// LESS
gulp.task('less', function () {
  
  console.log('\nCrunching…')
  gulp.src('src/themes/m8tro/build.less')
    .pipe(less({
      paths: [ path.join(__dirname, 'less', 'includes') ]
    }))
    .pipe(concat('m8tro.css'))
    .pipe(gulp.dest('dist/css/'))
    .pipe(concat('m8tro.min.css'))
    .pipe(cssmin())
    .pipe(gulp.dest('dist/css/'));
});


// Copy tasks
gulp.task('fa_css', function() {
  
  console.log('+font-awesome.min.css');
  gulp.src('bower_components/fontawesome/css/font-awesome.min.css')
  .pipe(gulp.dest(__dirname+'/dist/css/'));
});


// Copy tasks
gulp.task('fa_fonts', function() {

  console.log('+fontawesome-webfont.*');
  gulp.src([
    'bower_components/fontawesome/fonts/fontawesome-webfont.eot',
    'bower_components/fontawesome/fonts/fontawesome-webfont.svg',
    'bower_components/fontawesome/fonts/fontawesome-webfont.ttf',
    'bower_components/fontawesome/fonts/fontawesome-webfont.woff'
  ])
  .pipe(gulp.dest(__dirname+'/dist/fonts/'));
});


gulp.task('bootstrapjs', function() {
  console.log('+bootstrap.min.js');
  gulp.src([
      'bower_components/bootstrap/dist/js/bootstrap.min.js'
    ])
    .pipe(gulp.dest('dist/js/'));

  console.log('+jquery.min.js');
  gulp.src([
      'bower_components/jquery/dist/jquery.min.js'
    ])
    .pipe(gulp.dest('dist/js/'));
});


// Customize Bootstrap assets
gulp.task('custom', ['clean'], function(){
  var _components = [
   'Print media styles',
   'Typography',<commit_msg>fixed task names<commit_after> /*
  * m8tro-bootstrap
  * https://github.com/idleberg/m8tro-bootstrap
  *
  * Copyright (c) 2014 <NAME>
  * Licensed under the MIT license.
  */


// Read package.json metadata
var meta     = require('./package.json');

// Gulp plugins
var concat   = require('gulp-concat'),
    csslint  = require('gulp-csslint'),
    cssmin   = require('gulp-cssmin'),
    del      = require('del'),
    gulp     = require('gulp'),
    htmlval  = require('gulp-html-validator'),
    inject   = require('gulp-inject'),
    jshint   = require('gulp-jshint'),
    less     = require('gulp-less'),
    path     = require('path'),
    prompt   = require('gulp-prompt'),
    sequence = require('run-sequence'),
    util     = require('gulp-util'),
    uglify   = require('gulp-uglify'),
    watch    = require('gulp-watch');


/*
 * Task combos
 */
gulp.task('css',     ['csslint']);
gulp.task('html',    ['htmlval']);
gulp.task('js',      ['jshint']);
gulp.task('build',   ['setup']);
gulp.task('custom',  ['setup']);
gulp.task('prefs',   ['setup']);
gulp.task('clear',   ['clean']);
gulp.task('empty',   ['clean']);
gulp.task('flush',   ['clean']);
gulp.task('trash',   ['clean']);

gulp.task('default', ['help']);

gulp.task('lint',    ['css', 'html', 'js']);
gulp.task('travis',  ['css', 'html']);


/*
 * Sub-tasks
 */
 gulp.task('make', ['clean'], function(callback) {

   console.log('\nBuilding M8tro theme:')
   sequence(
       ['fa_css', 'fa_fonts'],
       'bootstrapjs',
       'less',
       callback
     );
 });


// HTML Page
gulp.task('htmlval', function () {
  return htmlval([
        'index.html'
    ]);
});


// Custom CSS
gulp.task('csslint', function() {
  gulp.src([
      'dist/css/m8tro.css'
    ])
    .pipe(csslint())
    .pipe(csslint.reporter())
});


// Custom Javascript
gulp.task('jshint', function() {
  gulp.src([
      'dist/js/*'
    ])
    .pipe(jshint())
    .pipe(jshint.reporter())
});


// LESS
gulp.task('less', function () {
  
  console.log('\nCrunching…')
  gulp.src('src/themes/m8tro/build.less')
    .pipe(less({
      paths: [ path.join(__dirname, 'less', 'includes') ]
    }))
    .pipe(concat('m8tro.css'))
    .pipe(gulp.dest('dist/css/'))
    .pipe(concat('m8tro.min.css'))
    .pipe(cssmin())
    .pipe(gulp.dest('dist/css/'));
});


// Copy tasks
gulp.task('fa_css', function() {
  
  console.log('+font-awesome.min.css');
  gulp.src('bower_components/fontawesome/css/font-awesome.min.css')
  .pipe(gulp.dest(__dirname+'/dist/css/'));
});


// Copy tasks
gulp.task('fa_fonts', function() {

  console.log('+fontawesome-webfont.*');
  gulp.src([
    'bower_components/fontawesome/fonts/fontawesome-webfont.eot',
    'bower_components/fontawesome/fonts/fontawesome-webfont.svg',
    'bower_components/fontawesome/fonts/fontawesome-webfont.ttf',
    'bower_components/fontawesome/fonts/fontawesome-webfont.woff'
  ])
  .pipe(gulp.dest(__dirname+'/dist/fonts/'));
});


gulp.task('bootstrapjs', function() {
  console.log('+bootstrap.min.js');
  gulp.src([
      'bower_components/bootstrap/dist/js/bootstrap.min.js'
    ])
    .pipe(gulp.dest('dist/js/'));

  console.log('+jquery.min.js');
  gulp.src([
      'bower_components/jquery/dist/jquery.min.js'
    ])
    .pipe(gulp.dest('dist/js/'));
});


// Customize Bootstrap assets
gulp.task('setup', ['clean'], function(){
  var _components = [
   'Print media styles',
   'Typography',
{'fraction_non_alphanumeric': 0.2189877121123464, 'fraction_numerical': 0.0032182562902282035, 'mean_word_length': 3.2125693160813307, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4278548', 'n_tokens_mistral': 2585, 'n_tokens_neox': 2514, 'n_words': 349}