grunt-contrib-livereload
Version:
Reload assets live in the browser
55 lines (46 loc) • 1.22 kB
JavaScript
/*
* grunt-contrib-livereload
* http://gruntjs.com/
*
* Copyright (c) 2012 Author, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'test/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
// Unit tests.
simplemocha: {
options: {
globals: ['should'],
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd',
reporter: 'spec'
},
all: { src: 'test/**/*.js' }
}
});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-contrib-internal');
// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.registerTask('test', ['simplemocha']);
// By default, lint and run all tests.
grunt.registerTask('default', ['test', 'build-contrib']);
};