{"size": 1676, "ext": "js", "max_stars_repo_path": "Gruntfile.js", "max_stars_repo_name": "ebu/cpa.js", "max_stars_repo_stars_event_min_datetime": "2015-02-24T23:25:10.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-02T09:04:10.000Z", "max_issues_repo_path": "Gruntfile.js", "max_issues_repo_name": "ebu/cpa.js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Gruntfile.js", "max_forks_repo_name": "ebu/cpa.js", "max_forks_repo_forks_event_min_datetime": "2015-05-01T11:56:54.000Z", "max_forks_repo_forks_event_max_datetime": "2020-01-02T09:04:14.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 22.9589041096, "max_line_length": 103, "alphanum_fraction": 0.477326969}
module.exports = function(grunt) {

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

    uglify: {
      options: {
        banner: '/*! <%= pkg.name.replace(".js", "") %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
      },
      dist: {
        files: {
          'dist/<%= pkg.name.replace(".js", "") %>.min.js': ['dist/<%= pkg.name %>']
        }
      }
    },

    browserify: {
      'dist/cpa.js': ['src/main.js'],
      options: {
        bundleOptions: {
          standalone: '<%= pkg.name.replace(".js", "") %>'
        }
      }
    },

    jsdoc: {
      dist: {
        src: ['./src/*.js', './src/utils/*.js', './src/cpa/*.js'],
        options: {
          destination: 'doc'
        }
      }
    },

    jshint: {
      files: ['src/*.js', 'src/utils/*.js', 'src/cpa/*.js'],
      options: {
        globals: {
          console: true,
          module: true,
          document: true
        },
        jshintrc: '.jshintrc'
      }
    },

    mocha: {
      test: {
        src: ['test/**/*.html'],
        options: {
          run: true
        }
      }
    },

    watch: {
      files: ['src/*', 'src/utils/*', 'src/cpa/*.js', 'test/*.js'],
      tasks: ['jshint', 'browserify', 'uglify', 'mocha']
    }
  });

  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-mocha');
  grunt.loadNpmTasks('grunt-jsdoc');

  grunt.registerTask('build', ['jshint', 'browserify', 'uglify']);
  grunt.registerTask('test', ['build', 'mocha']);
  grunt.registerTask('default', ['test']);
};
