module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), library: grunt.file.readJSON('bower.json'), uglify: { options: { banner: '/*! <%= pkg.name %> <%= pkg.version %> */' }, jid: { files: { '<%= library.name %>.min.js': ['<%= library.name %>.js'] } } }, jshint: { options: { src: [ '<%= library.name %>' ], // options here to override JSHint defaults globals: { module: true }, globalstrict: false } }, watch: { options: { spawn: false, dateFormat: function(time){} }, test: { files: [ "scorpion.js", "scorpion-tests.js" ], tasks: ['test'] } }, mochaTest: { test: { options: { clearRequireCache: true, reporter: 'min', require: [ function(){ Scorpion = require('./scorpion'); expect = require('chai').expect; } ] }, src: [ "scorpion.js", "scorpion-tests.js" ] } } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-mocha-test'); grunt.registerTask('default', ['jshint', 'uglify']); grunt.registerTask('test', ['jshint', 'mochaTest']); grunt.registerTask('live', ['test', 'watch:test']); };