forked from csnover/TraceKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
66 lines (63 loc) · 1.91 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
/*global module:false*/
module.exports = function (grunt) {
'use strict';
/**
* Bypass grunt-bump limitation
* see https://github.com/vojtajina/grunt-bump/pull/189
*/
var gruntBumpPrereleaseName = 'rc';
grunt.initConfig({
bump: {
options: {
files: ['package.json', 'bower.json', 'appveyor.yml'],
prereleaseName: gruntBumpPrereleaseName,
/**
* Need to create a new RegExp for appveyor
* https://github.com/vojtajina/grunt-bump/issues/190
*/
regExp: new RegExp(
'([\'|\"]?version[\'|\"]?[ ]*:[ ]*[\'|\"]?)(\\d+\\.\\d+\\.\\d+(-' +
gruntBumpPrereleaseName +
'\\.\\d+)?(-\\d+)?)[\\d||A-a|-]*([\'|\"]?)', 'i'
)
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
lint: {
src: [
'grunt.js',
'tracekit.js'
]
}
},
jasmine : {
src: [
'tracekit.js',
'spec/fixtures/captured-errors.js'
],
options: {
specs: 'spec/*-spec.js'
}
},
jsdoc : {
dist: {
src: ['tracekit.js'],
options: {
destination: 'doc',
readme: 'README.md',
configure: 'jsdoc.conf.json'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.registerTask('doc', ['jsdoc']);
grunt.registerTask('test', ['jasmine']);
grunt.registerTask('default', ['jshint:lint']);
};