2014-02-24 23:14:31 +01:00
|
|
|
module.exports = function (grunt) {
|
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-09-24 01:27:41 +02:00
|
|
|
|
2014-02-25 20:42:40 +01:00
|
|
|
less: {
|
|
|
|
files: [
|
2014-07-29 01:02:05 +02:00
|
|
|
'<%= app %>/**/styles/**/*.less',
|
2014-08-13 00:56:53 +02:00
|
|
|
'<%= app %>/**/components/**/*.less',
|
|
|
|
'<%= app %>/**/components/vislib/components/styles/**/*.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
|
|
|
},
|
2014-09-24 01:27:41 +02:00
|
|
|
|
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-09-12 00:37:23 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (grunt.option('no-test-watcher')) {
|
|
|
|
// unset the test watcher
|
|
|
|
delete config.test;
|
|
|
|
}
|
|
|
|
|
|
|
|
var ruby_server = grunt.config.get('ruby_server');
|
|
|
|
if (ruby_server) {
|
|
|
|
config.kibana_server = {
|
2014-08-26 02:55:32 +02:00
|
|
|
files: [
|
|
|
|
'src/server/**/*.rb',
|
|
|
|
'src/server/**/*.yml'
|
2014-08-26 19:55:58 +02:00
|
|
|
],
|
2014-09-12 00:37:23 +02:00
|
|
|
tasks: [
|
|
|
|
'stop:' + ruby_server,
|
|
|
|
'run:' + ruby_server
|
|
|
|
],
|
2014-08-26 23:09:41 +02:00
|
|
|
options: {
|
|
|
|
spawn: false
|
|
|
|
}
|
2014-09-12 00:37:23 +02:00
|
|
|
};
|
2014-03-07 19:25:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return config;
|
2014-02-24 23:14:31 +01:00
|
|
|
};
|