This repository was archived by the owner on Sep 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgruntfile.js
More file actions
62 lines (50 loc) · 1.35 KB
/
gruntfile.js
File metadata and controls
62 lines (50 loc) · 1.35 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
module.exports = function (grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
// Task configuration.
jshint: {
options: {
reporter: require('jshint-stylish'),
jshintrc: '.jshintrc'
},
src: {
src: ['lib/**/*.js', 'index.js', 'gruntfile.js']
},
test: {
src: ['test/**/*.js']
}
},
mochaTest: {
options: {
reporter: 'spec',
require: [
]
},
src: ['<%= jshint.test.src %>']
},
env: {
test: {
NODE_ENV: 'test'
}
},
watch: {
src: {
files: '<%= jshint.src.src %>',
tasks: ['test', 'jshint:src']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['test', 'jshint:test']
}
}
});
// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt, {});
// Full testing task
grunt.registerTask('test', ['env:test', 'mochaTest']);
// Default task.
grunt.registerTask('default', ['jshint', 'watch']);
};