-
Notifications
You must be signed in to change notification settings - Fork 130
/
Gruntfile.js
97 lines (86 loc) · 3.23 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
'use strict';
module.exports = function (grunt) {
require('jit-grunt')(grunt, {});
grunt.loadNpmTasks('grunt-cache-breaker');
// Define the configuration
grunt.initConfig({
// Project settings
bower: grunt.file.readJSON('bower.json'),
clean: {
src: ['dist']
},
copy: {
files: {
cwd: '.',
src: [
'index.html',
'src/assets/**',
'src/**/*.html',
'src/**/**/*.html',
'src/**/**/**/*.html',
'src/**/**/**/**/*.html',
'src/*.html',
'env.js',
'bower_components/angular/angular.min.js',
'bower_components/angular/angular.min.js.map', // Include source-maps
'bower_components/angular-route/angular-route.min.js',
'bower_components/angular-route/angular-route.min.js.map', // Include source-maps
'bower_components/angular-animate/angular-animate.min.js',
'bower_components/angular-animate/angular-animate.min.js.map', // Include source-maps
'bower_components/angular-aria/angular-aria.min.js',
'bower_components/angular-aria/angular-aria.min.js.map', // Include source-maps
'bower_components/angular-material/angular-material.min.css',
'bower_components/font-awesome/css/font-awesome.min.css',
'bower_components/components-font-awesome/**',
'bower_components/font-awesome/fonts/**',
'bower_components/ace-builds/src-min-noconflict/ace.js',
'bower_components/ace-builds/src-min-noconflict/ext*.js',
'bower_components/ace-builds/src-min-noconflict/mode-json.js',
'bower_components/ace-builds/src-min-noconflict/mode-batchfile.js',
'bower_components/ace-builds/src-min-noconflict/theme-chrome.js',
'bower_components/ace-builds/src-min-noconflict/worker-json.js',
'bower_components/ace-builds/src-min-noconflict/mode-properties.js',
'bower_components/angular-ui-ace/ui-ace.min.js',
'bower_components/angular-material/angular-material.min.js',
'bower_components/angularUtils-pagination/dirPagination.js',
'bower_components/angular-google-chart/ng-google-chart.min.js',
'bower_components/angular-messages/angular-messages.min.js'
],
dest: 'dist',
expand: true
}
},
concat: {
dist: {
src: ['src/supported-connectors.js', 'src/factories/dirPagination.js', 'src/app.js',
'src/**/*-factory.js','src/**/*.factory.js', 'src/**/*.controller.js', 'src/**/**/*.controller.js',
'src/**/**/**/*.controller.js','src/**/**/**/*.component.js', 'src/**/**/**/*.filter.js','src/**/**/**/*.service.js'],
dest: 'dist/src/combined.js'
}
},
cachebreaker: {
js: {
options: {
match: ['combined.js'],
replacement: 'md5',
src: {
path: 'dist/src/combined.js'
}
},
files: {
src: ['dist/index.html']
}
}
},
usemin: {
html: ['dist/index.html']
}
});
grunt.registerTask('default', [
'clean',
'copy',
'concat',
'usemin',
'cachebreaker'
]);
};