forked from teppeis/grunt-parallelize
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
67 lines (57 loc) · 1.22 KB
/
Gruntfile.js
File metadata and controls
67 lines (57 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* grunt-parallelize
* https://github.com/teppeis/grunt-parallelize
*
* Copyright (c) 2013 Teppei Sato <teppeis@gmail.com>
* Licensed under the MIT license.
*/
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'tasks/*.js',
'lib/*.js',
'<%= mochaTest.src %>',
]
},
// Configuration to be run (and then tested).
parallelize: {
jshint: {
options: {
processes: 2
},
all: 2
},
},
mochaTest: {
options: {
reporter: 'spec'
},
src: ['test/*_test.js'],
},
watch: {
test: {
files: [
'<%= jshint.all %>',
'test/**/*'
],
tasks: ['jshint', 'test']
},
},
});
// Display the elapsed time.
require('time-grunt')(grunt);
// Actually load this plugin's tasks.
grunt.loadTasks('tasks');
// Load necessary tasks.
require('load-grunt-tasks')(grunt);
// Register tasks.
grunt.registerTask('test', ['mochaTest']);
grunt.registerTask('default', ['parallelize:jshint:all', 'test']);
};