forked from lmenezes/elasticsearch-kopf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
167 lines (163 loc) · 4.64 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
module.exports = function(grunt) {
grunt.initConfig({
clean: {
dist: {
src: ['dist']
}
},
watch: {
scripts: {
files: ['src/kopf/**/*.*','src/kopf/*.*'],
tasks: ['build'],
options: {
spawn: false,
},
},
},
copy: {
main: {
files: [
{expand: true, flatten: true, src: ['src/lib/ace/mode-json.js'], dest: './'},
{expand: true, flatten: true, src: ['src/lib/ace/worker-json.js'], dest: './'},
{expand: true, flatten: true, src: ['src/kopf/theme-kopf.js'], dest: './'}
]
}
},
concat: {
vendorjs: {
src: [
'src/lib/jquery/jquery-1.10.2.min.js',
'src/lib/angularjs/angular.min.js',
'src/lib/ace/ace.js',
'src/lib/jsontree/jsontree.min.js',
'src/lib/bootstrap/js/bootstrap.js'
],
dest: 'dist/lib.js'
},
vendorcss: {
src: [
'src/lib/bootstrap/css/bootstrap.css'
],
dest: 'dist/lib.css'
},
appjs: {
src: [
'src/kopf/elastic/alias.js',
'src/kopf/elastic/aliases.js',
'src/kopf/elastic/cluster_changes.js',
'src/kopf/elastic/cluster_health.js',
'src/kopf/elastic/cluster_settings.js',
'src/kopf/elastic/cluster.js',
'src/kopf/elastic/elastic_client.js',
'src/kopf/elastic/index.js',
'src/kopf/elastic/editable_index_settings.js',
'src/kopf/elastic/node.js',
'src/kopf/elastic/shard.js',
'src/kopf/elastic/token.js',
// CONTROLLERS
'src/kopf/controllers.js',
'src/kopf/kopf.js',
'src/kopf/controllers/aliases.js',
'src/kopf/controllers/analysis.js',
'src/kopf/controllers/cluster_health.js',
'src/kopf/controllers/cluster_overview.js',
'src/kopf/controllers/cluster_settings.js',
'src/kopf/controllers/create_index.js',
'src/kopf/controllers/global.js',
'src/kopf/controllers/index_settings.js',
'src/kopf/controllers/navbar.js',
'src/kopf/controllers/rest.js',
'src/kopf/controllers/percolator.js',
'src/kopf/controllers/repository.js',
'src/kopf/controllers/confirm_dialog.js',
'src/kopf/controllers/warmup.js',
// SERVICES
'src/kopf/services/alerts.js',
'src/kopf/services/settings.js',
// MODELS
'src/kopf/models/ace_editor.js',
// UTIL
'src/kopf/util.js',
],
dest: 'dist/kopf.js'
},
appcss: {
src: [
'src/kopf/kopf.css',
'src/kopf/css/percolator.css',
'src/kopf/css/common.css',
'src/kopf/css/index_settings.css',
'src/kopf/css/aliases.css',
'src/kopf/css/analysis.css',
'src/kopf/css/cluster_health.css',
'src/kopf/css/cluster_overview.css',
'src/kopf/css/gist_share.css',
'src/kopf/css/json_tree.css',
'src/kopf/css/navbar.css',
'src/kopf/css/rest_client.css',
'src/kopf/css/warmup.css',
'src/kopf/css/repository.css'
],
dest: 'dist/kopf.css'
},
},
connect: {
server: {
options: {
port: 9000,
base: '.',
keepalive: true
}
}
},
jshint: {
kopf: {
src: [
'src/kopf/elastic/alias.js',
'src/kopf/elastic/aliases.js',
'src/kopf/elastic/cluster_changes.js',
'src/kopf/elastic/cluster_health.js',
'src/kopf/elastic/cluster.js',
'src/kopf/elastic/elastic_client.js',
'src/kopf/elastic/index.js',
'src/kopf/elastic/node.js',
'src/kopf/elastic/shard.js',
'src/kopf/elastic/token.js',
// CONTROLLERS
'src/kopf/controllers.js',
'src/kopf/kopf.js',
'src/kopf/controllers/aliases.js',
'src/kopf/controllers/analysis.js',
'src/kopf/controllers/cluster_health.js',
'src/kopf/controllers/cluster_overview.js',
'src/kopf/controllers/cluster_settings.js',
'src/kopf/controllers/create_index.js',
'src/kopf/controllers/global.js',
'src/kopf/controllers/index_settings.js',
'src/kopf/controllers/navbar.js',
'src/kopf/controllers/rest.js',
'src/kopf/controllers/percolator.js',
'src/kopf/controllers/confirm_dialog.js',
'src/kopf/controllers/warmup.js',
// SERVICES
'src/kopf/services/alerts.js',
'src/kopf/services/settings.js',
// MODELS
'src/kopf/models/ace_editor.js'
]
}
},
qunit: {
all: ['tests/all.html']
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.registerTask('build', ['clean', 'jshint', 'qunit', 'copy', 'concat']);
grunt.registerTask('server', ['clean', 'jshint', 'qunit', 'copy', 'concat','connect:server']);
};