This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
forked from kryton/hue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
130 lines (125 loc) · 8.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
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
/*
Licensed to Cloudera, Inc. under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. Cloudera, Inc. licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
module.exports = function(grunt) {
'use strict';
var config = {};
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Project configuration.
grunt.initConfig({
config: config,
less: {
hue: {
options: {
paths: ['desktop/core/src/desktop/static/desktop/less'],
compress: true,
banner: '/*!\nLicensed to Cloudera, Inc. under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. Cloudera, Inc. licenses this file\nto you under the Apache License, Version 2.0 (the\n"License"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n */'
},
files: {
'desktop/core/src/desktop/static/desktop/css/home.css': 'desktop/core/src/desktop/static/desktop/less/home.less',
'desktop/core/src/desktop/static/desktop/css/hue.css': 'desktop/core/src/desktop/static/desktop/less/hue.less',
'desktop/core/src/desktop/static/desktop/css/hue3-extra.css': 'desktop/core/src/desktop/static/desktop/less/hue3-extra.less',
'desktop/core/src/desktop/static/desktop/css/login.css': 'desktop/core/src/desktop/static/desktop/less/login.less',
'desktop/core/src/desktop/static/desktop/css/login4.css': 'desktop/core/src/desktop/static/desktop/less/login4.less',
'desktop/core/src/desktop/static/desktop/css/httperrors.css': 'desktop/core/src/desktop/static/desktop/less/httperrors.less',
'apps/metastore/src/metastore/static/metastore/css/metastore.css': 'apps/metastore/src/metastore/static/metastore/less/metastore.less',
'desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css': 'desktop/libs/notebook/src/notebook/static/notebook/less/notebook.less',
'desktop/libs/notebook/src/notebook/static/notebook/css/notebook-layout.css': 'desktop/libs/notebook/src/notebook/static/notebook/less/notebook-layout.less',
'apps/oozie/src/oozie/static/oozie/css/workflow-editor.css': 'apps/oozie/src/oozie/static/oozie/less/workflow-editor.less',
'apps/oozie/src/oozie/static/oozie/css/workflow.css': 'apps/oozie/src/oozie/static/oozie/less/workflow.less',
'apps/oozie/src/oozie/static/oozie/css/common-editor.css': 'apps/oozie/src/oozie/static/oozie/less/common-editor.less',
'apps/oozie/src/oozie/static/oozie/css/coordinator.css': 'apps/oozie/src/oozie/static/oozie/less/coordinator.less',
'apps/oozie/src/oozie/static/oozie/css/coordinator-editor.css': 'apps/oozie/src/oozie/static/oozie/less/coordinator-editor.less',
'desktop/libs/dashboard/src/dashboard/static/dashboard/css/admin.css': 'desktop/libs/dashboard/src/dashboard/static/dashboard/less/admin.less',
'desktop/libs/dashboard/src/dashboard/static/dashboard/css/admin_mobile.css': 'desktop/libs/dashboard/src/dashboard/static/dashboard/less/admin_mobile.less',
'desktop/libs/dashboard/src/dashboard/static/dashboard/css/common_dashboard.css': 'desktop/libs/dashboard/src/dashboard/static/dashboard/less/common_dashboard.less',
'desktop/libs/dashboard/src/dashboard/static/dashboard/css/search.css': 'desktop/libs/dashboard/src/dashboard/static/dashboard/less/search.less',
'desktop/libs/dashboard/src/dashboard/static/dashboard/css/search_mobile.css': 'desktop/libs/dashboard/src/dashboard/static/dashboard/less/search_mobile.less',
'apps/filebrowser/src/filebrowser/static/filebrowser/css/display.css': 'apps/filebrowser/src/filebrowser/static/filebrowser/less/display.less',
'apps/filebrowser/src/filebrowser/static/filebrowser/css/listdir_components.css': 'apps/filebrowser/src/filebrowser/static/filebrowser/less/listdir_components.less',
'apps/jobbrowser/src/jobbrowser/static/jobbrowser/css/jobbrowser.css': 'apps/jobbrowser/src/jobbrowser/static/jobbrowser/less/jobbrowser.less',
'apps/jobbrowser/src/jobbrowser/static/jobbrowser/css/jobbrowser-embeddable.css': 'apps/jobbrowser/src/jobbrowser/static/jobbrowser/less/jobbrowser-embeddable.less',
'apps/useradmin/src/useradmin/static/useradmin/css/useradmin.css': 'apps/useradmin/src/useradmin/static/useradmin/less/useradmin.less',
'apps/hbase/src/hbase/static/hbase/css/hbase.css': 'apps/hbase/src/hbase/static/hbase/less/hbase.less',
'apps/security/src/security/static/security/css/security.css': 'apps/security/src/security/static/security/less/security.less',
'apps/sqoop/src/sqoop/static/sqoop/css/sqoop.css': 'apps/sqoop/src/sqoop/static/sqoop/less/sqoop.less',
'desktop/libs/indexer/src/indexer/static/indexer/css/indexes.css': 'desktop/libs/indexer/src/indexer/static/indexer/less/indexes.less',
'desktop/libs/indexer/src/indexer/static/indexer/css/importer.css': 'desktop/libs/indexer/src/indexer/static/indexer/less/importer.less',
}
}
},
watch: {
options: {
atBegin: true
},
less: {
files: [
'desktop/core/src/desktop/static/desktop/less/*.less',
'desktop/core/src/desktop/static/desktop/less/**/*.less',
'apps/metastore/src/metastore/static/metastore/less/*.less',
'apps/metastore/src/metastore/static/metastore/less/**/*.less',
'desktop/libs/notebook/src/notebook/static/notebook/less/*.less',
'desktop/libs/notebook/src/notebook/static/notebook/less/**/*.less',
'apps/oozie/src/oozie/static/oozie/less/*.less',
'apps/oozie/src/oozie/static/oozie/less/**/*.less',
'desktop/libs/dashboard/src/dashboard/static/dashboard/less/*.less',
'desktop/libs/dashboard/src/dashboard/static/dashboard/less/**/*.less',
'apps/filebrowser/src/filebrowser/static/filebrowser/less/*.less',
'apps/filebrowser/src/filebrowser/static/filebrowser/less/**/*.less',
'apps/jobbrowser/src/jobbrowser/static/jobbrowser/less/*.less',
'apps/jobbrowser/src/jobbrowser/static/jobbrowser/less/**/*.less',
'apps/useradmin/src/useradmin/static/useradmin/less/*.less',
'apps/useradmin/src/useradmin/static/useradmin/less/**/*.less',
'apps/hbase/src/hbase/static/hbase/less/*.less',
'apps/hbase/src/hbase/static/hbase/less/**/*.less',
'apps/security/src/security/static/security/less/*.less',
'apps/security/src/security/static/security/less/**/*.less',
'apps/sqoop/src/sqoop/static/sqoop/less/*.less',
'apps/sqoop/src/sqoop/static/sqoop/less/**/*.less',
],
tasks: ['less']
}
},
uglify: {
sqlAutocompleteParser: {
files: {
'desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sqlAutocompleteParser.js': ['desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sqlAutocompleteParser.js']
}
},
sqlSyntaxParser: {
files: {
'desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sqlSyntaxParser.js': ['desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sqlSyntaxParser.js']
}
},
sqlStatementsParser: {
files: {
'desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sqlStatementsParser.js': ['desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sqlStatementsParser.js']
}
},
globalSearchParser: {
files: {
'desktop/core/src/desktop/static/desktop/js/autocomplete/jison/globalSearchParser.js': ['desktop/core/src/desktop/static/desktop/js/autocomplete/jison/globalSearchParser.js']
}
},
solrExpressionParser: {
files: {
'desktop/core/src/desktop/static/desktop/js/autocomplete/jison/solrExpressionParser.js': ['desktop/core/src/desktop/static/desktop/js/autocomplete/jison/solrExpressionParser.js']
}
}
}
});
};