2014-02-24 23:14:31 +01:00
|
|
|
module.exports = function (grunt) {
|
2014-09-04 00:15:58 +02:00
|
|
|
var kibana_server_tasks = [];
|
2014-09-11 20:03:54 +02:00
|
|
|
if (grunt.option('use-jruby')) {
|
2014-09-04 00:15:58 +02:00
|
|
|
kibana_server_tasks = [
|
|
|
|
'stop:mri_server',
|
|
|
|
'run:mri_server'
|
|
|
|
];
|
|
|
|
} else {
|
|
|
|
kibana_server_tasks = [
|
|
|
|
'stop:jruby_server',
|
|
|
|
'run:jruby_server'
|
|
|
|
];
|
|
|
|
}
|
2014-03-07 19:25:40 +01:00
|
|
|
var config = {
|
2014-02-24 23:14:31 +01:00
|
|
|
test: {
|
2014-03-06 00:56:42 +01:00
|
|
|
files: [
|
|
|
|
'<%= unitTestDir %>/**/*.js'
|
|
|
|
],
|
2014-03-05 22:13:23 +01:00
|
|
|
tasks: ['mocha:unit']
|
2014-02-24 23:47:09 +01:00
|
|
|
},
|
2014-02-25 20:42:40 +01:00
|
|
|
less: {
|
|
|
|
files: [
|
2014-08-15 22:57:00 +02:00
|
|
|
'<%= app %>/**/*.less',
|
2014-07-29 01:02:05 +02:00
|
|
|
'<%= app %>/**/styles/**/*.less',
|
|
|
|
'<%= app %>/**/components/**/*.less'
|
2014-02-25 20:42:40 +01:00
|
|
|
],
|
2014-02-24 23:47:09 +01:00
|
|
|
tasks: ['less']
|
2014-02-25 20:42:40 +01:00
|
|
|
},
|
|
|
|
jade: {
|
|
|
|
files: [
|
2014-03-06 00:56:42 +01:00
|
|
|
'<%= unitTestDir %>/index.jade'
|
|
|
|
],
|
|
|
|
tasks: ['jade:test']
|
|
|
|
},
|
|
|
|
clientside_jade: {
|
|
|
|
files: [
|
2014-03-07 01:37:43 +01:00
|
|
|
'<%= testUtilsDir %>/istanbul_reporter/report.clientside.jade'
|
2014-02-25 20:42:40 +01:00
|
|
|
],
|
2014-03-06 00:56:42 +01:00
|
|
|
tasks: ['jade:clientside']
|
2014-08-26 02:55:32 +02:00
|
|
|
},
|
|
|
|
kibana_server: {
|
|
|
|
files: [
|
|
|
|
'src/server/**/*.rb',
|
|
|
|
'src/server/**/*.yml'
|
2014-08-26 19:55:58 +02:00
|
|
|
],
|
2014-09-04 00:15:58 +02:00
|
|
|
tasks: kibana_server_tasks,
|
2014-08-26 23:09:41 +02:00
|
|
|
options: {
|
|
|
|
spawn: false
|
|
|
|
}
|
2014-02-24 23:14:31 +01:00
|
|
|
}
|
2014-02-24 23:47:09 +01:00
|
|
|
};
|
2014-03-07 19:25:40 +01:00
|
|
|
|
|
|
|
if (grunt.option('no-test-watcher')) {
|
|
|
|
// unset the test watcher
|
|
|
|
delete config.test;
|
|
|
|
}
|
|
|
|
|
|
|
|
return config;
|
2014-02-24 23:14:31 +01:00
|
|
|
};
|