forked from chemerisuk/better-dateinput-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
54 lines (50 loc) · 1.44 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
module.exports = function(grunt) {
"use strict";
var pkg = grunt.file.readJSON("package.json");
grunt.initConfig({
pkg: pkg,
watch: {
jasmine: {
files: ["src/*.js", "test/spec/*.spec.js"],
tasks: ["karma:coverage:run"]
}
},
karma: {
options: {
configFile: "test/karma.conf.js"
},
coverage: {
preprocessors: { "src/*.js": "coverage" },
reporters: ["coverage", "progress"],
background: true
},
unit: {
singleRun: true
}
},
jshint: {
all: ["Gruntfile.js", "src/*.js", "test/spec/*.spec.js"],
options: {
jshintrc: ".jshintrc"
}
},
shell: {
bower: {
command: "bower install"
}
}
});
Object.keys(pkg.devDependencies).forEach(function(name) {
if (!name.indexOf("grunt-")) grunt.loadNpmTasks(name);
});
grunt.registerTask("test", ["jshint", "karma:unit"]);
grunt.registerTask("dev", ["jshint", "karma:coverage", "watch"]);
grunt.registerTask("publish", "Publish a new version", function(version) {
grunt.task.run([
"shell:bower",
"test",
"github_publish:" + version,
"shell:bower"
]);
});
};