nowk
4/29/2014 - 9:44 PM

Simple grunt build

Simple grunt build

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    uglify: {
      dist: {
        files: [{
          expand: true,
          cwd: './',
          src: ['index.js'],
          dest: 'dist'
        }]
      }
    },
    jshint: {
      files: ['./index.js'],
      options: {
        globals: {
          jQuery: false,
          console: true,
          module: true,
          document: true
        }
      }
    },
  });

  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-jshint');

  grunt.registerTask('build', ['jshint', 'uglify']);
};