forked from walmartlabs/lumbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
62 lines (55 loc) · 1.35 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
/*global grunt */
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
force: true
},
files: [
'lib/**/*.js',
'test/*.js',
'test/plugins/*.js'
]
},
mochacov: {
test: {
options: {
reporter: 'spec'
},
src: ['test/*.js', 'test/plugins/*.js', 'test/util/*.js']
},
cov: {
options: {
reporter: 'html-cov'
},
src: ['test/*.js', 'test/plugins/*.js', 'test/util/*.js']
},
options: {
require: ['./test/lib/mocha-sinon']
}
},
githubPages: {
target: {
options: {
// The default commit message for the gh-pages branch
commitMessage: 'push'
},
// The folder where your gh-pages repo is
src: '_site'
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-cov');
grunt.loadNpmTasks('grunt-github-pages');
grunt.registerTask('test', ['jshint', 'mochacov:test']);
grunt.registerTask('cov', ['mochacov:cov']);
grunt.registerTask('docs', function() {
this.async();
var Static = require('static'),
static = new Static('docs');
static.publish('_site');
});
grunt.registerTask('docs-deploy', ['githubPages:target']);
};