-
Notifications
You must be signed in to change notification settings - Fork 383
/
Gruntfile.js
89 lines (87 loc) · 3.59 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
module.exports = function(grunt) {
grunt.initConfig({
node: './node_modules',
dest: './src/main/webapp/_res/node',
destJs: '<%= dest %>/js',
destCss: '<%= dest %>/css',
clean: {
build: {
src: ['<%= dest %>']
}
},
mkdir: {
all: {
options: {
create: ['<%= destCss %>/jquery-ui/images', '<%= destJs %>/jquery-ui/widgets']
},
},
},
copy: {
main: {
files: [
{
expand: true,
flatten: true,
src: ['<%= node %>/bootstrap/dist/css/bootstrap*min*',
'<%= node %>/xterm/css/xterm.*'
],
dest: '<%= destCss %>/',
filter: 'isFile'
},
{
expand: true,
flatten: true,
src: ['<%= node %>/jquery-ui/themes/base/*'],
dest: '<%= destCss %>/jquery-ui/',
filter: 'isFile'
},
{
expand: true,
flatten: true,
src: ['<%= node %>/jquery-ui/themes/base/images/*'],
dest: '<%= destCss %>/jquery-ui/images',
filter: 'isFile'
},
{
expand: true,
flatten: true,
src: ['<%= node %>/jquery/dist/jquery.min.*',
'<%= node %>/@popperjs/core/dist/umd/popper.min.js',
'<%= node %>/@popperjs/core/dist/umd/popper.min.js.map',
'<%= node %>/bootstrap/dist/js/bootstrap.min.*',
'<%= node %>/floatthead/dist/jquery.floatThead.min.*',
'<%= node %>/xterm/lib/xterm.*',
'<%= node %>/xterm-addon-fit/lib/xterm-addon-fit.*'
],
dest: '<%= destJs %>/',
filter: 'isFile'
},
{
expand: true,
flatten: true,
src: ['<%= node %>/jquery-ui/ui/*.*'],
dest: '<%= destJs %>/jquery-ui/',
filter: 'isFile'
},
{
expand: true,
flatten: true,
src: ['<%= node %>/jquery-ui/ui/widgets/draggable.*',
'<%= node %>/jquery-ui/ui/widgets/droppable.*',
'<%= node %>/jquery-ui/ui/widgets/resizable.*',
'<%= node %>/jquery-ui/ui/widgets/selectable.*',
'<%= node %>/jquery-ui/ui/widgets/sortable.*',
'<%= node %>/jquery-ui/ui/widgets/mouse.*'
],
dest: '<%= destJs %>/jquery-ui/widgets',
filter: 'isFile'
}
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-mkdir');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('default', ['clean','mkdir','copy']);
};