This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
62 lines (59 loc) · 1.43 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
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
nodeunit: {
all: ['test/**/*.js']
},
jshint: {
all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.test.js'],
options: {
"eqeqeq": true,
"laxcomma": true
}
},
jsdoc: {
all: {
src: ['README.md', 'lib/**/*.js', 'test/**/*.js'],
options: {
destination: 'doc',
configure: 'jsdoc.json'
}
}
},
watch: {
scripts: {
files: ['lib/**/*.js', 'test/**/*.js'],
tasks: ['jshint', 'jsdoc'],
options: {
spawn: false,
},
},
},
copy: {
docs: {
files: [
{expand: true, cwd: 'doc/', src: ['**'], dest: '_doc/'},
{expand: true, src: ['media/**'], dest: '_doc/'}
]
}
},
githubPages: {
docs: {
options: {
commitMessage: 'Update doc.'
},
src: '_doc'
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-github-pages');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('docs', ['jsdoc', 'copy:docs', 'githubPages:docs']);
grunt.registerTask('default', ['jshint', 'nodeunit']);
grunt.registerTask('test', ['jshint', 'nodeunit']);
};