<commit_before>'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
    return connect.static(require('path').resolve(dir));
};

module.exports = function (grunt) {
  // load all grunt tasks
  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  // configurable paths
  var config = {
      src: 'src',
      dist: 'dist',
      dev: '.dev',
      release: 'builds'
  };

  grunt.initConfig({
    config: config,
    watch: {
      coffee: {
        files: ['<%= config.src %>/{,*/}*.coffee'],
        tasks: ['coffee:dist', 'copy']
      },
      coffeeTest: {
        files: ['test/spec/{,*/}*.coffee'],
        tasks: ['coffee:test']
      },
      compass: {
        files: ['<%= config.src %>/{,*/}*.{scss,sass}'],
        tasks: ['compass', 'copy']
      },
      statics: {
        files: ['<%= config.src %>/*.html', '{.tmp,<%= config.src %>}/{,*/}*.css', '{.tmp,<%= config.src %>}/{,*/}*.js', '{.tmp,<%= config.src %>}/vendor/{,*/}*.js'],
        tasks: ['copy']
      },
      livereload: {
        files: [
            '<%= config.src %>/*.html',
            '{.tmp,<%= config.src %>}/{,*/}*.css',
            '{.tmp,<%= config.src %>}/{,*/}*.js',
            '<%= config.src %>/images/{,*/}*.{png,jpg,jpeg,webp}'
        ],
        tasks: ['livereload']
      }
    },
    connect: {
      options: {
        port: 3000,
        // change this to '0.0.0.0' to access the server from outside
        hostname: '0.0.0.0'
      },
      livereload: {
        options: {
          middleware: function (connect) {
            return [
                lrSnippet,
                mountFolder(connect, '.dev'),
                mountFolder(connect, 'src')
            ];
          }
        }
      },
      test: {
        options: {
          middleware: function (connect) {
            return [
                mountFolder(connect, '.tmp'),
                mountFolder(connect, 'test')
            ];
          }
        }
      },
      dist: {
        options: {
          middleware: function (connect) {
            return [
                mountFolder(connect, 'dist')
            ];
          }
        }
      }
    },
    open: {
        server: {
            path: 'http://localhost:<%= connect.options.port %>'
        }
    },
    clean: {
        dist: ['.tmp', '<%= config.dist %>/*'],
        server: '.tmp',
        dev: '.dev',
        release: 'builds'
    },
    jshint: {
      options: {
          jshintrc: '.jshintrc'
      },
      all: [
          'Gruntfile.js',
          '<%= config.src %>//{,*/}*.js',
          '!vendor/*',
          'test/spec/{,*/}*.js'
      ]
    },
    mocha: {
      all: {
        options: {
            run: true,
            urls: ['http://localhost:<%= connect.options.port %>/index.html']
        }
      }
    },
    coffee: {
      dist: {
        files: [{
          // rather than compiling multiple files here you should
          // require them into your main .coffee file
          expand: true,
          cwd: '<%= config.src %>',
          src: '*.coffee',
          dest: '.tmp',
          ext: '.js'
        }]
      },
      test: {
        files: [{
          expand: true,
          cwd: '.tmp/spec',
          src: '*.coffee',
          dest: 'test/spec'
        }]
      }
    },
    compass: {
      options: {
        sassDir: '<%= config.src %>',
        cssDir: '<%= config.dev %>/styles',
        imagesDir: '<%= config.src %>/images',
        javascriptsDir: '<%= config.src %>',
        fontsDir: '<%= config.src %>/styles/fonts',
        // importPath: '<%= config.src %>/components',
        relativeAssets: true
      },
      dist: {},
      server: {
        options: {
            debugInfo: true
        }
      }
    },
    uglify: {
      dist: {
        files: {
          '<%= config.dist %>/github-calendar.min.js': [
              '<%= config.src %>/{,*/}*.js',
              '.tmp/{,*/}*.js'
          ],
        }
      }
    },
    useminPrepare: {
      html: '<%= config.src %>/index.html',
      options: {
        dest: '<%= config.dist %>'
      }
    },
    usemin: {
      html: ['<%= config.dist %>/{,*/}*.html'],
      css: ['<%= config.dist %>/{,*/}*.css'],
      options: {
          dirs: ['<%= config.dist %>']
      }
    },
    imagemin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= config.src %>/images',<commit_msg>reanme the build in config<commit_after>'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
    return connect.static(require('path').resolve(dir));
};

module.exports = function (grunt) {
  // load all grunt tasks
  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  // configurable paths
  var config = {
      src: 'src',
      dist: 'dist',
      dev: '.dev',
      release: 'builds'
  };

  grunt.initConfig({
    config: config,
    watch: {
      coffee: {
        files: ['<%= config.src %>/{,*/}*.coffee'],
        tasks: ['coffee:dist', 'copy']
      },
      coffeeTest: {
        files: ['test/spec/{,*/}*.coffee'],
        tasks: ['coffee:test']
      },
      compass: {
        files: ['<%= config.src %>/{,*/}*.{scss,sass}'],
        tasks: ['compass', 'copy']
      },
      statics: {
        files: ['<%= config.src %>/*.html', '{.tmp,<%= config.src %>}/{,*/}*.css', '{.tmp,<%= config.src %>}/{,*/}*.js', '{.tmp,<%= config.src %>}/vendor/{,*/}*.js'],
        tasks: ['copy']
      },
      livereload: {
        files: [
            '<%= config.src %>/*.html',
            '{.tmp,<%= config.src %>}/{,*/}*.css',
            '{.tmp,<%= config.src %>}/{,*/}*.js',
            '<%= config.src %>/images/{,*/}*.{png,jpg,jpeg,webp}'
        ],
        tasks: ['livereload']
      }
    },
    connect: {
      options: {
        port: 3000,
        // change this to '0.0.0.0' to access the server from outside
        hostname: '0.0.0.0'
      },
      livereload: {
        options: {
          middleware: function (connect) {
            return [
                lrSnippet,
                mountFolder(connect, '.dev'),
                mountFolder(connect, 'src')
            ];
          }
        }
      },
      test: {
        options: {
          middleware: function (connect) {
            return [
                mountFolder(connect, '.tmp'),
                mountFolder(connect, 'test')
            ];
          }
        }
      },
      dist: {
        options: {
          middleware: function (connect) {
            return [
                mountFolder(connect, 'dist')
            ];
          }
        }
      }
    },
    open: {
        server: {
            path: 'http://localhost:<%= connect.options.port %>'
        }
    },
    clean: {
        dist: ['.tmp', '<%= config.dist %>/*'],
        server: '.tmp',
        dev: '.dev',
        release: 'builds'
    },
    jshint: {
      options: {
          jshintrc: '.jshintrc'
      },
      all: [
          'Gruntfile.js',
          '<%= config.src %>//{,*/}*.js',
          '!vendor/*',
          'test/spec/{,*/}*.js'
      ]
    },
    mocha: {
      all: {
        options: {
            run: true,
            urls: ['http://localhost:<%= connect.options.port %>/index.html']
        }
      }
    },
    coffee: {
      dist: {
        files: [{
          // rather than compiling multiple files here you should
          // require them into your main .coffee file
          expand: true,
          cwd: '<%= config.src %>',
          src: '*.coffee',
          dest: '.tmp',
          ext: '.js'
        }]
      },
      test: {
        files: [{
          expand: true,
          cwd: '.tmp/spec',
          src: '*.coffee',
          dest: 'test/spec'
        }]
      }
    },
    compass: {
      options: {
        sassDir: '<%= config.src %>',
        cssDir: '<%= config.dev %>/styles',
        imagesDir: '<%= config.src %>/images',
        javascriptsDir: '<%= config.src %>',
        fontsDir: '<%= config.src %>/styles/fonts',
        // importPath: '<%= config.src %>/components',
        relativeAssets: true
      },
      dist: {},
      server: {
        options: {
            debugInfo: true
        }
      }
    },
    uglify: {
      dist: {
        files: {
          '<%= config.dist %>/simple-select.min.js': [
              '<%= config.src %>/{,*/}*.js',
              '.tmp/{,*/}*.js'
          ],
        }
      }
    },
    useminPrepare: {
      html: '<%= config.src %>/index.html',
      options: {
        dest: '<%= config.dist %>'
      }
    },
    usemin: {
      html: ['<%= config.dist %>/{,*/}*.html'],
      css: ['<%= config.dist %>/{,*/}*.css'],
      options: {
          dirs: ['<%= config.dist %>']
      }
    },
    imagemin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= config.src %>/images',
{'fraction_non_alphanumeric': 0.20372643088251702, 'fraction_numerical': 0.0026776748856409682, 'mean_word_length': 1.3846767757382283, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '7075607', 'n_tokens_mistral': 2993, 'n_tokens_neox': 2850, 'n_words': 521}