forked from grbsk/ng-idle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
64 lines (61 loc) · 1.38 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
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
banner: '/**'+
'* <%= pkg.description %>\n'+
'* @author <%= pkg.author %>\n'+
'* @version v<%= pkg.version %>\n'+
'* @link <%= pkg.repository.url %>\n' +
'* @license <%= pkg.license %>\n'+
'*/',
bump: {
options: {
files: ['package.json', 'bower.json'],
commit: false,
createTag: false,
push: false
}
},
karma: {
options: {
configFile: 'karma.conf.js',
browsers: [ grunt.option('browser') || 'PhantomJS' ]
},
unit: {
singleRun: true
},
server: {
autoWatch: true,
browsers: [ grunt.option('browser') || 'Chrome']
}
},
clean: pkg.main,
concat: {
options: {
stripBanners: true,
banner: '<%= banner %>'
},
js: {
src: ['src/angular-idle.js'],
dest: 'angular-idle.js'
}
},
uglify: {
js: {
src: ['angular-idle.js'],
dest: 'angular-idle.min.js',
options: {
banner: '<%= banner %>',
sourceMap: true,
sourceMapName: 'angular-idle.map'
}
}
}
});
grunt.registerTask('test', ['karma:unit']);
grunt.registerTask('test-server', ['karma:server']);
grunt.registerTask('build', ['clean', 'concat:js', 'uglify']);
};