<commit_before>module.exports = function(grunt) {
  "use strict";

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jshint: {
      all: [
        'src/upup.js',
        'Gruntfile.js'
      ],
      options: {
        jshintrc: true
      }
    },
    uglify: {
      options: {
        preserveComments: 'some',
        sourceMap: true
      },
      all: {
        files: {
          'dist/upup.min.js': ['src/upup.js'],
          'dist/upup.sw.min.js': ['src/vendor/serviceworker-cache-polyfill.js', 'src/upup.sw.js'],
        }
      }
    },
    imagemin: {
      demoimages: {                       // Target
        options: {                        // Target options
        },
        files: [{
          expand: true,                   // Enable dynamic expansion
          cwd: 'demo/img',                // Src matches are relative to this path
          src: ['*.{png,jpg,gif}'],       // Actual patterns to match
          dest: 'demo/img'                // Destination path prefix
        }]
      },
    },
    watch: {
      tasks: ['default'],
      files: ['src/**', 'demo/css/online.css', '!**/node_modules/**'],
    },
    connect: {
      server: {
        options: {
          protocol: 'http',
          port: 8443,
          hostname: '*',
          base: '.',
          open: 'http://localhost:8443/demo'
        }
      }
    },
    cssmin: {
      combine: {
        files: {
          'demo/css/online.min.css': ['demo/css/online.css']
        }
      }
    },
    markdox: {
      target: {
        files: [
          {src: 'src/upup.js', dest: 'docs/README.md'}
        ]
      }
    },
    compress: {
      main: {
        options: {
          archive: 'dist/upup.zip'
        },
        files: [
          {expand: true, cwd: 'dist', src: ['*.js']}
        ]
      }
    }
  });

  // Load NPM Tasks
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-imagemin');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-markdox');
  grunt.loadNpmTasks('grunt-contrib-compress');
  grunt.loadNpmTasks('grunt-contrib-cssmin');

  // Default task(s).
  grunt.registerTask('default', ['jshint', 'uglify', 'markdox', 'imagemin', 'cssmin', 'compress']);

  grunt.registerTask('dev', ['default', 'connect', 'watch']);

};<commit_msg>Grunt watch now runs less tasks when changes detected<commit_after>module.exports = function(grunt) {
  "use strict";

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jshint: {
      all: [
        'src/upup.js',
        'Gruntfile.js'
      ],
      options: {
        jshintrc: true
      }
    },
    uglify: {
      options: {
        preserveComments: 'some',
        sourceMap: true
      },
      all: {
        files: {
          'dist/upup.min.js': ['src/upup.js'],
          'dist/upup.sw.min.js': ['src/vendor/serviceworker-cache-polyfill.js', 'src/upup.sw.js'],
        }
      }
    },
    imagemin: {
      demoimages: {                       // Target
        options: {                        // Target options
        },
        files: [{
          expand: true,                   // Enable dynamic expansion
          cwd: 'demo/img',                // Src matches are relative to this path
          src: ['*.{png,jpg,gif}'],       // Actual patterns to match
          dest: 'demo/img'                // Destination path prefix
        }]
      },
    },
    watch: {
      files: ['src/**', 'demo/css/online.css', '!**/node_modules/**'],
      tasks: ['devwatcher'],
    },
    connect: {
      server: {
        options: {
          protocol: 'http',
          port: 8443,
          hostname: '*',
          base: '.',
          open: 'http://localhost:8443/demo'
        }
      }
    },
    cssmin: {
      combine: {
        files: {
          'demo/css/online.min.css': ['demo/css/online.css']
        }
      }
    },
    markdox: {
      target: {
        files: [
          {src: 'src/upup.js', dest: 'docs/README.md'}
        ]
      }
    },
    compress: {
      main: {
        options: {
          archive: 'dist/upup.zip'
        },
        files: [
          {expand: true, cwd: 'dist', src: ['*.js']}
        ]
      }
    }
  });

  // Load NPM Tasks
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-imagemin');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-markdox');
  grunt.loadNpmTasks('grunt-contrib-compress');
  grunt.loadNpmTasks('grunt-contrib-cssmin');

  // Default task(s).
  grunt.registerTask('default', ['jshint', 'uglify', 'markdox', 'imagemin', 'cssmin', 'compress']);

  grunt.registerTask('devwatcher', ['jshint', 'uglify', 'cssmin']);

  grunt.registerTask('dev', ['default', 'connect', 'watch']);

};
{'fraction_non_alphanumeric': 0.17092142002393299, 'fraction_numerical': 0.0031910650179497405, 'mean_word_length': 1.6718167288225891, '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': '5121215', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1653, 'n_words': 266}