-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
64 lines (62 loc) · 2.39 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) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
//grunt task configuration will go here
ngAnnotate: {
options: {
singleQuotes: true,
add: true,
separator: ';\n'
},
app: {
files: {
'./client/min-safe/app.annotated.js': ['./client/app.js'],
'./client/min-safe/apis.annotated.js': ['./client/modules/apis.js'],
'./client/min-safe/teams.annotated.js': ['./client/modules/teams.js'],
'./client/min-safe/badges.annotated.js': ['./client/modules/badges.js'],
'./client/min-safe/nav.annotated.js': ['./client/modules/nav.js'],
'./client/min-safe/search.annotated.js': ['./client/modules/search.js'],
'./client/min-safe/datastore.annotated.js': ['./client/modules/datastore.js']
}
}
},
uglify: {
options: {
mangle: false,
compress: {
drop_console: true
}
},
angular: {
src: ['./client/min-safe/app.annotated.js', './client/min-safe/apis.annotated.js', './client/min-safe/teams.annotated.js',
'./client/min-safe/badges.annotated.js', './client/min-safe/nav.annotated.js', './client/min-safe/search.annotated.js', './client/min-safe/datastore.annotated.js'],
dest: './client/min/ngapp.min.js'
}
},
concat: {
angular: {
src: ['./client/js/angular.min.js', './client/js/moment.min.js', './client/js/angular-moment.min.js',
'./client/js/angular-ui-router.min.js', './client/js/ui-bootstrap-tpls.min.js', './client/js/promise.min.js', './client/min/ngapp.min.js', './client/js/please-wait.min.js'],
dest: './dist/splusapp.min.js'
}
},
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'./dist/output.css': ['./client/css/bootstrap.css', './client/css/styles.css', './client/css/ui-bootstrap-csp.css', './client/css/please-wait.css', './client/css/opensans.css']
}
}
}
});
//load grunt tasks
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-ng-annotate');
grunt.loadNpmTasks('grunt-contrib-cssmin');
//register grunt default task
grunt.registerTask('default', ['ngAnnotate', 'uglify', 'concat', 'cssmin']);
}