forked from node-gh/gh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
82 lines (72 loc) · 2.15 KB
/
Gruntfile.js
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Copyright 2013, All Rights Reserved.
*
* Code licensed under the BSD License:
* https://github.com/node-gh/gh/blob/master/LICENSE.md
*
* @author Zeno Rocha <[email protected]>
* @author Eduardo Lundgren <[email protected]>
*/
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
bump: {
options: {
commit: true,
commitFiles: ['package.json'],
commitMessage: 'Release v%VERSION%',
createTag: true,
files: ['package.json'],
push: true,
pushTo: 'origin',
tagMessage: '',
tagName: 'v%VERSION%'
}
},
jsbeautifier: {
files: ['bin/*.js', 'lib/**/*.js', 'test/**/*.js', '*.js'],
options: {
config: '.jsbeautifyrc'
}
},
jshint: {
gruntfile: 'Gruntfile.js',
lib: {
src: ['bin/*.js', 'lib/**/*.js']
},
options: grunt.file.readJSON('.jshintrc'),
test: {
options: grunt.file.readJSON('test/.jshintrc'),
src: ['test/**/*.js']
}
},
mochaTest: {
test: {
options: {
reporter: 'spec',
slow: 1500,
timeout: 50000
},
src: ['test/**/*.js']
}
},
watch: {
files: [
'Gruntfile.js',
'<%= jshint.lib.src %>',
'<%= jshint.test.src %>'
],
tasks: ['lint', 'test']
}
});
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('ci', ['lint', 'test']);
grunt.registerTask('default', ['lint', 'test']);
grunt.registerTask('format', ['jsbeautifier']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('test', ['mochaTest']);
};