forked from etodanik/ion-google-place
-
Notifications
You must be signed in to change notification settings - Fork 88
/
Gruntfile.js
104 lines (96 loc) · 3.19 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
'use strict';
module.exports = function (grunt) {
// load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// add time used for tasks statistics
require('time-grunt')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
"bower-install-simple": {
options: {
color: true
},
dev: {
options: {
production: false
}
}
},
concat: {
js: {
options: {
banner: "/*\n * <%= pkg.name %> <%= pkg.version %>\n * Copyright <%= grunt.template.today('yyyy') %> Danny Povolotski \n * Copyright modifications <%= grunt.template.today('yyyy') %> Guy Brand \n * https://github.com/guylabs/ion-autocomplete\n */\n(function() {\n\n'use strict';\n\n",
footer: '\n})();',
separator: '\n',
process: true
},
src: 'src/ion-autocomplete.js',
dest: 'dist/<%= pkg.name %>.js'
},
css: {
src: 'src/ion-autocomplete.css',
dest: 'dist/<%= pkg.name %>.css'
}
},
uglify: {
options: {
banner: "/*\n * <%= pkg.name %> <%= pkg.version %>\n * Copyright <%= grunt.template.today('yyyy') %> Danny Povolotski \n * Copyright modifications <%= grunt.template.today('yyyy') %> Guy Brand \n * https://github.com/guylabs/ion-autocomplete\n */\n"
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.js.dest %>']
}
}
},
cssmin: {
target: {
files: [{
expand: true,
cwd: 'src',
src: ['ion-autocomplete.css'],
dest: 'dist',
ext: '.min.css'
}]
}
},
karma: {
unit: {
configFile: 'karma.conf.js'
},
continuous: {
configFile: 'karma.conf.js',
singleRun: true
}
},
'http-server': {
dev: {
runInBackground: true
},
debug: {
runInBackground: false
}
},
protractor: {
options: {
configFile: "protractor-conf.js"
},
run: {}
},
coveralls: {
options: {
src: 'coverage-results/lcov.info',
force: true
},
your_target: {
src: 'coverage-results/extra-results-*.info'
}
}
});
grunt.registerTask('build', ['bower-install-simple:dev', 'test', 'concat', 'uglify', 'cssmin']);
grunt.registerTask('test', ['karma:continuous', 'http-server:dev', 'protractor:run']);
grunt.registerTask('default', ['build']);
// cannot use sauce labs with a pull requests
if (parseInt(process.env.TRAVIS_PULL_REQUEST, 10) > 0) {
grunt.registerTask('test', ['karma:continuous']);
}
};