2015-03-30 22:01:32 +02:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
// You can specify which browsers to build with by using grunt-style arguments
|
|
|
|
// or separating them with a comma:
|
|
|
|
// grunt test:chrome:firefox # grunt-style
|
|
|
|
// grunt test:chrome,firefox # comma-separated
|
|
|
|
grunt.registerTask('test-local', function() {
|
2015-05-01 21:53:51 +02:00
|
|
|
let tasks = this.args;
|
|
|
|
let tasksMinified;
|
2015-03-30 22:01:32 +02:00
|
|
|
|
|
|
|
// if we aren't running this in a CI, but running it manually, we can
|
|
|
|
// supply arguments to this task. These arguments are either colon (`:`)
|
|
|
|
// separated which is the default grunt separator for arguments, or they
|
|
|
|
// are comma (`,`) separated to make it easier.
|
|
|
|
// The arguments are the names of which browsers you want.
|
|
|
|
if (tasks.length === 0) {
|
|
|
|
tasks.push('chrome');
|
|
|
|
}
|
|
|
|
if (tasks.length === 1) {
|
|
|
|
tasks = tasks[0].split(',');
|
|
|
|
}
|
|
|
|
|
2015-05-01 21:53:51 +02:00
|
|
|
tasks = tasks.map((task) => `karma:${task}`);
|
2015-03-30 22:01:32 +02:00
|
|
|
|
|
|
|
grunt.task.run(tasks);
|
|
|
|
});
|
|
|
|
};
|