-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
49 lines (46 loc) · 1.12 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
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
gruntfile: {
options: {jshintrc: '.jshintrc'},
src: 'Gruntfile.js'
},
src: {
options: {jshintrc: 'src/.jshintrc'},
src: ['src/**/*.js']
},
test: {
options: {jshintrc: 'test/.jshintrc'},
src: ['test/**/*.js']
}
},
jasmine: {
src: ['src/**/*.js'],
options: {
vendor: ['lib/**/*.js'],
specs: ['test/**/*.js']
}
},
watch: {
gruntfile: {
files: 'Gruntfile.js',
tasks: ['jshint:gruntfile']
},
src: {
files: ['src/**/*.js'],
tasks: ['jshint:src', 'jasmine']
},
test: {
files: ['test/**/*.html', 'test/**/*.js'],
tasks: ['jshint:test', 'jasmine']
}
},
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('default', ['test']);
};