<commit_before>'use strict';

/**
 * Grunt setup
 */
module.exports = function(grunt) {

  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  grunt.initConfig({

    pkg: grunt.file.readJSON('package.json'),

    project: {
      src: 'src',
      filename: 'atomic',
      dist: 'dist',
      test: 'test',
      core: ['<%= project.src %>/<%= project.filename %>.js']
    },

    banner: '/*! <%= pkg.title %> v<%= pkg.version %> | (c) <%= grunt.template.today(\'yyyy\') %> @toddmotto | <%= pkg.homepage %> */\n',

    jshint: {
      gruntfile: 'Gruntfile.js',
      files: ['<%= project.core %>'],
      options: {
        jshintrc: '.jshintrc'
      }
    },

    jasmine : {
      src : 'src/**/*.js',
      options : {
        specs : 'test/**/*.js'
      }
    },

    concat: {
      dist: {
        src: ['<%= project.core %>'],
        dest: '<%= project.dist %>/<%= project.filename %>.js',
      },
      options: {
        stripBanners: true,
        banner: '<%= banner %>'
      }
    },

    uglify: {
      options: {
        banner: '<%= banner %>'
      },
      dist: {
        src: '<%= project.dist %>/<%= project.filename %>.js',
        dest: '<%= project.dist %>/<%= project.filename %>.min.js'
      },
    },

    clean: {
      dist: [ 'dist' ]
      // test: [ '<%= project.test %>/<%= project.filename %>.js' ]
    },

    copy: {
      test: {
        src: '<%= project.src %>/<%= project.filename %>.js',
        dest: '<%= project.test %>/<%= project.filename %>.js',
      },
    },

    connect: {
      test: {
        options: {
          port: 9000,
          hostname: '*',
          open: true,
          keepalive: true,
          base: 'test'
        }
      }
    },

    watch: {
      gruntfile: {
        files: 'Gruntfile.js',
        tasks: ['jshint:gruntfile'],
      },
      js: {
        files: '<%= jshint.files %>',
        tasks: ['jshint', 'uglify'],
      }
    }
  });

  grunt.registerTask('default', [
    'clean',
    'jshint',
    'concat',
    'uglify',
    'jasmine'
  ]);

  grunt.registerTask('travis', [
    'jshint',
    'jasmine'
  ]);

};<commit_msg>Update Grunt tasks to simplify dist workflow<commit_after>'use strict';

/**
 * Grunt setup
 */
module.exports = function(grunt) {

  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  grunt.initConfig({

    pkg: grunt.file.readJSON('package.json'),

    project: {
      src: 'src',
      filename: 'atomic',
      dist: 'dist',
      test: 'test',
      core: ['<%= project.src %>/<%= project.filename %>.js']
    },

    banner: '/*! <%= pkg.title %> v<%= pkg.version %> | (c) <%= grunt.template.today(\'yyyy\') %> @munkychop | <%= pkg.homepage %> */\n',

    jshint: {
      gruntfile: 'Gruntfile.js',
      files: ['<%= project.core %>'],
      options: {
        jshintrc: '.jshintrc'
      }
    },

    jasmine : {
      src : 'src/**/*.js',
      options : {
        specs : 'test/**/*.js'
      }
    },

    uglify: {

      dev: {
        options: {
          compress: {
            'drop_console': true,
            'keep_fnames': true,
            'keep_fargs': true
          },
          mangle: false,
          beautify: true,
          banner: '<%= banner %>'
        },

        src: '<%= project.core %>',
        dest: '<%= project.dist %>/<%= project.filename %>.js'
      },
      dist: {
        options: {
          compress: {
            'drop_console': true
          },
          preserveComments: false
        },

        src: '<%= project.core %>',
        dest: '<%= project.dist %>/<%= project.filename %>.min.js'
      },
    },

    clean: {
      dist: [ 'dist' ]
      // test: [ '<%= project.test %>/<%= project.filename %>.js' ]
    },

    copy: {
      test: {
        src: '<%= project.src %>/<%= project.filename %>.js',
        dest: '<%= project.test %>/<%= project.filename %>.js'
      }
    },

    connect: {
      test: {
        options: {
          port: 9000,
          hostname: '*',
          open: true,
          keepalive: true,
          base: 'test'
        }
      }
    },

    watch: {
      gruntfile: {
        files: 'Gruntfile.js',
        tasks: ['jshint:gruntfile'],
      },
      js: {
        files: '<%= jshint.files %>',
        tasks: ['clean', 'jshint', 'uglify', 'jasmine'],
      }
    }
  });

  grunt.registerTask('default', [
    'clean',
    'jshint',
    'uglify',
    'jasmine'
  ]);

  grunt.registerTask('travis', [
    'jshint',
    'jasmine'
  ]);

};
{'fraction_non_alphanumeric': 0.21029281277728482, 'fraction_numerical': 0.001774622892635315, 'mean_word_length': 1.6617473435655254, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '2070383', 'n_tokens_mistral': 1669, 'n_tokens_neox': 1542, 'n_words': 260}