-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
152 lines (142 loc) · 4.58 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* to build in testflight */
//account 97fea4a9ffaa8bb7a22f21a18b5e31e5_MjAzMjk1NTIwMTQtMDgtMTEgMTc6MDE6MzUuODMyNTg4
//team 248dcb1a3e396b99e50c047c5424913a_NDI3NjU1MjAxNC0wOS0wMiAwNTowOToxNy45MDMzMzc
//ipa distribute:testflight -a 97fea4a9ffaa8bb7a22f21a18b5e31e5_MjAzMjk1NTIwMTQtMDgtMTEgMTc6MDE6MzUuODMyNTg4 -T 248dcb1a3e396b99e50c047c5424913a_NDI3NjU1MjAxNC0wOS0wMiAwNTowOToxNy45MDMzMzc
module.exports = function (grunt) {
'use strict';
grunt.initConfig( {
pkg : grunt.file.readJSON( 'package.json' ),
banner : '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>; */\n',
// Task configuration.
bower : {
install : {
}
},
/* karma : {
options : {
configFile : 'karma.conf.js',
runnerPort: 9100,
browsers: ['Chrome']
}
},
*/
karma: {
dev: {
configFile: 'karma.macdev.conf.js'
},
//continuous integration mode: run tests once in PhantomJS browser.
e2e: {
configFile: 'karma.conf.js',
singleRun: true,
browsers: ['PhantomJS']
}
},
// note clean with / on the end as without the * removes the directory, which I see as a bug
clean: ['test/artifacts/*', 'client/scripts/vendor/*'],
copy : {
main : {
files : [
{expand : true, flatten : true, cwd : 'lib/angular/', src : '*.js*', dest : 'client/js/vendor/' }
]
}
},
jshint : {
options : {
jshintrc : './.jshintrc',
force : true
},
gruntfile : {
src : 'Gruntfile.js'
},
all : {
options : {
ignores : [
'client/js/vendor/**/*.js'
]
},
src : [
'client/**/*.js'
]
}
},
connect : {
e2e : {
options : {
port : 9000,
base : 'client',
hostname : '*'
}
},
dev : {
options : {
port : 9000,
base : 'client',
hostname : '*',
keepalive : true
}
}
},
protractor : {
options : {
noColor : false
},
dev : {
options: {
configFile: 'protractor.conf.dev.js"', // Target-specific config file
args: {}
}
},
ci: {
options : {
configFile : 'protractor.conf.js', // Target-specific config file
args : {}
}
}
},
selenium_start : {
options : { timeout : 9999}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint' );
grunt.loadNpmTasks('grunt-selenium-webdriver' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
// use grunt phonegap:build:android
grunt.loadNpmTasks('grunt-mocha-cli');
grunt.registerTask('e2e', [
'selenium_phantom_hub',
'connect:e2e',
'protractor:ci',
'selenium_stop'
]);
grunt.registerTask('e2e:dev', [
'selenium_start',
'connect:e2e',
'protractor:dev',
'selenium_stop'
]);
// use this for testing via webstorm
grunt.registerTask('webstorm', [
'selenium_phantom_hub',
'connect:dev'
]);
// use this for testing via protractor client
grunt.registerTask('procli', [
'selenium_start',
'connect:dev'
]);
// test task
grunt.registerTask( 'test', [ 'karma:e2e', 'e2e' ]);
// Default task.
grunt.registerTask( 'build', ['clean', 'bower', 'copy' , 'jshint' ] );
// Default task.
grunt.registerTask( 'default', ['build' ] );
};