<commit_before>var autoprefixer = require('autoprefixer-core');
var GittyCache = require('./tasks/utils/gitty-cache');

module.exports = function(grunt) {
  require('load-grunt-tasks')(grunt);

  grunt.initConfig({});
  grunt.loadTasks('tasks');
  grunt.loadTasks('backbone.marionette/tasks');

  GittyCache.setReleaseTag(grunt.option('TAG'));

  grunt.config.merge({
    'gitty:releaseTag': {
      marionette: {
        options: {
          repo: 'backbone.marionette'
        }
      }
    },
    'gitty:checkoutTag': {
      marionette: {
        options: {
          repo: 'backbone.marionette'
        }
      }
    },

    docco: {
      build: {
        src: ['backbone.marionette/lib/backbone.marionette.js'],
        options: {
          output: 'dist/annotated-src/'
        }
      }
    },

    clean: {
      dist: ['dist']
    },

    connect: {
      server: {
        options: {
          base: 'dist',
          port: 8000
        }
      }
    },

    copy: {
      assets: {
        files: [
          {
            expand: true,
            cwd: 'src/',
            src: ['images/**/*','!images/**/*.{png,jpg,gif}'],
            dest: 'dist/'
          },
          {
            expand: true,
            cwd: 'src/',
            src: ['js/**/*'],
            dest: 'dist/'
          },
          {
            expand: true,
            src: ['bower_components/**/*'],
            dest: 'dist/'
          },
          {
            expand: true,
            cwd: 'src/stylesheets',
            src: ['fonts/icons/*'],
            dest: 'dist/styles'
          }
        ]
      }
    },

    imagemin: {
      dynamic: {
        files: [{
          expand: true,
          cwd: 'src/',
          src: ['images/**/*.{png,jpg,gif}'],
          dest: 'dist/'
        }]
      }
    },

    sass: {
      dist: {
        options:{
          outputStyle: 'compressed'
        },
        files: {
          'dist/styles/marionette.css': 'src/stylesheets/marionette.scss',
          'dist/styles/api.css': 'src/stylesheets/api.scss',
          'dist/styles/docs.css': 'src/stylesheets/docs.scss'
        }
      }
    },

    postcss: {
      options: {
        processors: [
          autoprefixer({ browsers: ['last 2 version'] }).postcss
        ]
      },
      dist: { src: 'dist/styles/*.css' }
    },

    watch: {
      options: {
        atBegin: true
      },
      styles: {
        files: 'src/stylesheets/**/*.scss',
        tasks: ['notify:preHTML', 'sass', 'postcss', 'notify:postHTML']
      },
      scrips: {
        files: 'src/js/**/*',
        tasks: ['notify:preHTML', 'copy', 'notify:postHTML']
      },
      assets: {
        files: 'src/images/**/*',
        tasks: ['copy']
      },
      pages: {
        files: 'src/**/*.jade',
        tasks: ['notify:preHTML', 'compile-templates', 'notify:postHTML']
      }
    },

    jade: {
      compile : {
        files: {
          'dist/index.html': 'src/index.jade'
        },
        options: {
          data: function(){
            return {
              VERSION: GittyCache.releaseTag || 'v.X.X.X'
            };
          }
        }
      }
    },

    notify: {
      watch: {<commit_msg>Add image min to watch.<commit_after>var autoprefixer = require('autoprefixer-core');
var GittyCache = require('./tasks/utils/gitty-cache');

module.exports = function(grunt) {
  require('load-grunt-tasks')(grunt);

  grunt.initConfig({});
  grunt.loadTasks('tasks');
  grunt.loadTasks('backbone.marionette/tasks');

  GittyCache.setReleaseTag(grunt.option('TAG'));

  grunt.config.merge({
    'gitty:releaseTag': {
      marionette: {
        options: {
          repo: 'backbone.marionette'
        }
      }
    },
    'gitty:checkoutTag': {
      marionette: {
        options: {
          repo: 'backbone.marionette'
        }
      }
    },

    docco: {
      build: {
        src: ['backbone.marionette/lib/backbone.marionette.js'],
        options: {
          output: 'dist/annotated-src/'
        }
      }
    },

    clean: {
      dist: ['dist']
    },

    connect: {
      server: {
        options: {
          base: 'dist',
          port: 8000
        }
      }
    },

    copy: {
      assets: {
        files: [
          {
            expand: true,
            cwd: 'src/',
            src: ['images/**/*','!images/**/*.{png,jpg,gif}'],
            dest: 'dist/'
          },
          {
            expand: true,
            cwd: 'src/',
            src: ['js/**/*'],
            dest: 'dist/'
          },
          {
            expand: true,
            src: ['bower_components/**/*'],
            dest: 'dist/'
          },
          {
            expand: true,
            cwd: 'src/stylesheets',
            src: ['fonts/icons/*'],
            dest: 'dist/styles'
          }
        ]
      }
    },

    imagemin: {
      dynamic: {
        files: [{
          expand: true,
          cwd: 'src/',
          src: ['images/**/*.{png,jpg,gif}'],
          dest: 'dist/'
        }]
      }
    },

    sass: {
      dist: {
        options:{
          outputStyle: 'compressed'
        },
        files: {
          'dist/styles/marionette.css': 'src/stylesheets/marionette.scss',
          'dist/styles/api.css': 'src/stylesheets/api.scss',
          'dist/styles/docs.css': 'src/stylesheets/docs.scss'
        }
      }
    },

    postcss: {
      options: {
        processors: [
          autoprefixer({ browsers: ['last 2 version'] }).postcss
        ]
      },
      dist: { src: 'dist/styles/*.css' }
    },

    watch: {
      options: {
        atBegin: true
      },
      styles: {
        files: 'src/stylesheets/**/*.scss',
        tasks: ['notify:preHTML', 'sass', 'postcss', 'notify:postHTML']
      },
      scrips: {
        files: 'src/js/**/*',
        tasks: ['notify:preHTML', 'copy', 'notify:postHTML']
      },
      assets: {
        files: 'src/images/**/*',
        tasks: ['imagemin', 'copy']
      },
      pages: {
        files: 'src/**/*.jade',
        tasks: ['notify:preHTML', 'compile-templates', 'notify:postHTML']
      }
    },

    jade: {
      compile : {
        files: {
          'dist/index.html': 'src/index.jade'
        },
        options: {
          data: function(){
            return {
              VERSION: GittyCache.releaseTag || 'v.X.X.X'
            };
          }
        }
      }
    },

    notify: {
      watch: {
{'fraction_non_alphanumeric': 0.172090112640801, 'fraction_numerical': 0.0015644555694618273, 'mean_word_length': 1.3306598614655487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2790644', 'n_tokens_mistral': 2100, 'n_tokens_neox': 2048, 'n_words': 313}