<commit_before>module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-html2js');

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    connect: {
      server: {
        port: 3000,
        base: '.'
      }
    },
    uglify: {
      options: {
        banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
      },
      build: {
        src: ['src/util.js', 'src/cubes.js', 'src/pager.js', 'src/crosstab.js', 'src/facts.js',
              'src/treemap.js', 'src/panel.js', 'src/workspace.js', 'src/cubes.js',
              'src/tmp/templates.js'],
        dest: 'build/<%= pkg.name %>.min.js'
      }
    },
    concat: {
      options: {
        stripBanners: true,
        separator: ';'
      },
      dist: {
        src: ['src/util.js', 'src/cubes.js', 'src/pager.js', 'src/crosstab.js', 'src/facts.js',
              'src/treemap.js', 'src/panel.js', 'src/workspace.js', 'src/cubes.js',
              'src/tmp/templates.js'],
        dest: 'build/<%= pkg.name %>.js'
      },
    },
    html2js: {
      dist: {
        options: {
          base: '.',
          module: 'ngCubes.templates',
          rename: function(name) {
            return name.replace('templates', 'angular-cubes-templates');
          }
        },
        src: ['templates/**/*.html'],
        dest: 'src/tmp/templates.js'
      }
    },
    less: {
      development: {
        options: {
          paths: ["less"],
          strictImports: true
        },
        files: {
          "build/angular-cubes.css": ["less/build.less"]
        }
      }
    },
    watch: {
      templates: {
        files: ['templates/**/*.html'],
        tasks: ['html2js']  
      },
      js: {
        files: ['src/**/*.js'],
        tasks: ['concat', 'uglify']  
      },
      style: {
        files: ['less/**/*.less'],
        tasks: ['less']  
      },
    }
  });

  grunt.registerTask('default', ['less', 'html2js', 'concat', 'uglify']);
};<commit_msg>Add grunt server task for easy development<commit_after>module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-html2js');

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    connect: {
      server: {
        port: 3000,
        base: '.'
      }
    },
    uglify: {
      options: {
        banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
      },
      build: {
        src: ['src/util.js', 'src/cubes.js', 'src/pager.js', 'src/crosstab.js', 'src/facts.js',
              'src/treemap.js', 'src/panel.js', 'src/workspace.js', 'src/cubes.js',
              'src/tmp/templates.js'],
        dest: 'build/<%= pkg.name %>.min.js'
      }
    },
    concat: {
      options: {
        stripBanners: true,
        separator: ';'
      },
      dist: {
        src: ['src/util.js', 'src/cubes.js', 'src/pager.js', 'src/crosstab.js', 'src/facts.js',
              'src/treemap.js', 'src/panel.js', 'src/workspace.js', 'src/cubes.js',
              'src/tmp/templates.js'],
        dest: 'build/<%= pkg.name %>.js'
      },
    },
    html2js: {
      dist: {
        options: {
          base: '.',
          module: 'ngCubes.templates',
          rename: function(name) {
            return name.replace('templates', 'angular-cubes-templates');
          }
        },
        src: ['templates/**/*.html'],
        dest: 'src/tmp/templates.js'
      }
    },
    less: {
      development: {
        options: {
          paths: ["less"],
          strictImports: true
        },
        files: {
          "build/angular-cubes.css": ["less/build.less"]
        }
      }
    },
    watch: {
      templates: {
        files: ['templates/**/*.html'],
        tasks: ['html2js']  
      },
      js: {
        files: ['src/**/*.js'],
        tasks: ['concat', 'uglify']  
      },
      style: {
        files: ['less/**/*.less'],
        tasks: ['less']  
      },
    }
  });

  grunt.registerTask('default', ['less', 'html2js', 'concat', 'uglify']);
  grunt.registerTask('server', ['connect', 'watch'])
};
{'fraction_non_alphanumeric': 0.20334075723830736, 'fraction_numerical': 0.0035634743875278397, 'mean_word_length': 1.844205193160228, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 11, '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': '2165397', 'n_tokens_mistral': 1628, 'n_tokens_neox': 1561, 'n_words': 221}