-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathGruntfile.js
66 lines (64 loc) · 2.03 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 */
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta : {
bin : {
lintFiles : ['Gruntfile.js', 'dist/matchers.js', 'config/*.js', 'test/*.js']
}
},
jslint: {
all : {
src: '<%= meta.bin.lintFiles %>',
options: { }
}
},
karma: {
options: {
singleRun: true,
browsers: ['PhantomJS'],
reporters: 'dots'
},
stable: {
configFile: 'config/karma.legacy.conf.js'
},
unstable: {
configFile: 'config/karma.stable.conf.js'
}
},
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
options: {
paths: ['dist/', 'test/'],
// themedir: 'path/to/custom/theme/',
outdir: 'docs/'
}
}
},
watch: {
files: '<%= meta.bin.lintFiles %>',
tasks: ['jslint', 'karma', 'yuidoc', 'notify:watch']
},
notify: {
watch: {
options: {
title: 'Task Complete', // optional
message: 'Finish Linting, Running Tests & Building Documentation' //required
}
}
}
});
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('test', ['jslint', 'karma:stable', 'karma:unstable']);
grunt.registerTask('doc', ['yuidoc']);
grunt.registerTask('default', ['jslint', 'karma:stable', 'karma:unstable']);
};