-
Notifications
You must be signed in to change notification settings - Fork 149
/
Gruntfile.js
100 lines (89 loc) · 3.57 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
'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',
'env.js',
'bower_components/angular/angular.min.js',
'bower_components/angular/angular.min.js.map', // Include source-maps
'bower_components/angular-spinner/angular-spinner.min.js',
'bower_components/angular-spinner/angular-spinner.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/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/angular-ui-ace/ui-ace.min.js',
'bower_components/spin.js/spin.min.js',
'bower_components/angular-material/angular-material.min.js',
'bower_components/angular-cookies/angular-cookies.min.js',
// 'bower_components/angularUtils-pagination/dirPagination.js',
'bower_components/angular-material-data-table/dist/md-data-table.min.css',
'bower_components/angular-material-data-table/dist/md-data-table.min.js',
'bower_components/angular-json-tree/dist/angular-json-tree.min.js',
'bower_components/angular-json-tree/dist/angular-json-tree.css',
'bower_components/angular-google-chart/ng-google-chart.min.js',
'bower_components/handsontable/dist/handsontable.full.js',
'bower_components/ngHandsontable/dist/ngHandsontable.js',
'bower_components/handsontable/dist/handsontable.full.css',
'bower_components/angular-base64/angular-base64.js',
],
dest: 'dist',
expand: true
}
},
concat: {
dist: {
src: ['src/*.js', 'src/factories/*.js', 'src/libs/**/*.js', 'src/kafka-topics/**/*.controller.js', 'src/kafka-topics/**/*.module.js'],
dest: 'dist/combined.js'
}
},
cachebreaker: {
js: {
options: {
match: ['combined.js'],
replacement: 'md5',
src: {
path: 'dist/combined.js'
}
},
files: {
src: ['dist/index.html']
}
}
},
usemin: {
html: ['dist/index.html']
}
});
grunt.registerTask('default', [
'clean',
'copy',
'concat',
'usemin', 'cachebreaker'
]);
};