You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
969 B
48 lines
969 B
module.exports = function(grunt) {
|
|
'use strict';
|
|
|
|
grunt.initConfig({
|
|
watch: {
|
|
all: {
|
|
files: ['lib/*.js'],
|
|
},
|
|
onlyAdded: {
|
|
options: {
|
|
event: 'added',
|
|
},
|
|
files: ['lib/*.js'],
|
|
},
|
|
onlyChanged: {
|
|
options: {
|
|
event: 'changed',
|
|
},
|
|
files: ['lib/*.js'],
|
|
},
|
|
onlyDeleted: {
|
|
options: {
|
|
event: 'deleted',
|
|
},
|
|
files: ['lib/*.js'],
|
|
},
|
|
onlyAddedAndDeleted: {
|
|
options: {
|
|
event: ['added', 'deleted'],
|
|
},
|
|
files: ['lib/*.js'],
|
|
}
|
|
},
|
|
});
|
|
|
|
// Load this watch task
|
|
grunt.loadTasks('../../../tasks');
|
|
|
|
// trigger on watch events
|
|
var timeout;
|
|
grunt.event.on('watch', function(action, filepath) {
|
|
grunt.log.writeln(filepath + ' was indeed ' + action);
|
|
clearTimeout(timeout);
|
|
timeout = setTimeout(function() {
|
|
grunt.util.exit(0);
|
|
}, 2000);
|
|
});
|
|
};
|