forked from helloworld02202/questionsJs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
79 lines (65 loc) · 1.57 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
67
68
69
70
71
72
73
74
75
76
77
78
79
"use strict";
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
all: ['Gruntfile.js',
'js/*.js',
'js/controllers/*.js',
'js/filters/*.js',
'test/**/*.js'],
options: {
"-W097":true,
globals: {
jQuery: true,
describe: true,
it: true,
expect: true,
beforeEach: true,
Autolinker: true,
inject: true,
module: true,
console: true
}
}
},
uglify: {
my_target: {
files: {
'dist/handsup.min.js': ['js/*.js', 'js/conrollers/*.js', 'js/filters/*.js']
}
}
},
// Test settings
karma: {
unit: {
configFile: 'karma.conf.js',
singleRun: true,
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
},
protractor: {
options: {
args: {
// Arguments passed to the command
}
},
all: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
options: {
configFile: "protractor.conf.js", // Target-specific config file
args: {} // Target-specific arguments
}
},
},
});
grunt.registerTask('test', ['jshint', 'karma']);
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');
// npm install grunt-protractor-runner --save-dev
grunt.loadNpmTasks('grunt-protractor-runner');
// npm install grunt-contrib-uglify --save-dev
grunt.loadNpmTasks('grunt-contrib-uglify');
};