forked from guylabs/angular-spring-data-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
65 lines (59 loc) · 1.94 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
'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: {
options: {
banner: "(function() {\n\n'use strict';\n\n",
footer: '\n})();',
separator: '\n',
process: true
},
dist: {
src: [
'src/angular-spring-data-rest-module.js',
'src/angular-spring-data-rest-provider.js',
'src/angular-spring-data-rest-interceptor-provider.js',
'src/angular-spring-data-rest-utils.js'
],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: "/*!\n * <%= pkg.name %> <%= pkg.version %>\n * Copyright <%= grunt.template.today('yyyy') %> Guy Brand (@guy_labs)\n * https://github.com/guylabs/angular-spring-data-rest\n */\n"
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
karma: {
unit: {
configFile: 'karma.conf.js'
},
continuous: {
configFile: 'karma.conf.js',
singleRun: true
}
}
});
grunt.registerTask('build', ['bower-install-simple:dev', 'karma:continuous', 'concat', 'uglify']);
grunt.registerTask('test', ['karma:continuous']);
grunt.registerTask('default', [ 'build' ]);
};