-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGruntfile.js
More file actions
78 lines (68 loc) · 1.46 KB
/
Copy pathGruntfile.js
File metadata and controls
78 lines (68 loc) · 1.46 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
/* global module */
module.exports = function (grunt) {
module.require('time-grunt')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'nice-package': {
all: {
options: {
blankLine: true
}
}
},
jshint: {
'options': {
jshintrc: '.jshintrc'
},
default: {
'src': [ '*.js', 'test/*.js' ]
}
},
sync: {
all: {
options: {
sync: ['author', 'name', 'version',
'private', 'license', 'keywords', 'homepage'],
}
}
},
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: ['test/*.js']
}
},
'clean-console': {
all: {
options: {
url: ['index.html'],
timeout: 1
}
}
},
karma: {
unit: {
configFile: 'karma.conf.js',
background: false,
singleRun: true,
logLevel: 'INFO',
browsers: ['PhantomJS']
}
},
watch: {
options: {
atBegin: true
},
all: {
files: ['*.js', 'test/*.js', 'index.html'],
tasks: ['jshint', 'test']
}
}
});
var plugins = module.require('matchdep').filterDev('grunt-*');
plugins.forEach(grunt.loadNpmTasks);
grunt.registerTask('test', ['mochaTest', 'karma', 'clean-console']);
grunt.registerTask('default', ['deps-ok', 'nice-package', 'sync', 'jshint', 'test']);
};